Notifications
Clear all
Topic starter
15/11/2021 12:10 pm
In Simhub there is an option to show the short name as Lewis Hamilton (LHA) while I would like to have HAM like F1 style.
How can I build this with the driver ahead and behind?
04/04/2022 11:07 pm
Hello, you need to put a text, in the text properties add a binding. (Check: Use JavaScript)
For Driver Ahead:
let driverAheadRaw = $prop('PersistantTrackerPlugin.DriverAhead_00_Name');
let driverAhead = (driverAheadRaw == null) ? '-' : driverAheadRaw.substr(driverAheadRaw.indexOf(' ') + 1,3).toUpperCase();
return driverAhead;
For Driver Behind:
let driverBehindRaw = $prop('PersistantTrackerPlugin.DriverBehind_00_Name');
let driverBehind = (driverBehindRaw == null) ? '-' : driverBehindRaw.substr(driverBehindRaw.indexOf(' ') + 1,3).toUpperCase();
return driverBehind;