Due to increasing spam attacks, forum registrations are currently paused to keep our community safe and spam-free. Come hang out and stay connected with us on the SimHub Discord: https://discord.com/invite/nBBMuX7!
Catch you on Discord — and thanks for understanding!
Catch you on Discord — and thanks for understanding!
Notifications
Clear all
Topic starter
15/11/2021 1: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?
05/04/2022 12:07 am
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;