Hey everyone, do you know if there is a possibility to remove penalties from specific drivers using the plugin interface? There is Code: mNumPenalties in Code: VehicleScoringInfoV01 but i assume its read-only. Maybe @Lazza has an idea? Best Frey
@1frey scoring and telemetry are definitely read-only unfortunately, no mechanism exists to return a value. In the past I personally handled this by manipulating the dedi UI controls to run server commands, which can work but still looks pretty clumsy (an ability to vet penalties via server plugin would have been great, but fine details like this I think never got a look-in next to bigger issues). I don't recall the details of the REST interface now in rF2 to advise whether you can do it through there, if so that might be less error prone (since each request will be isolated from others; though with a single program/plugin manipulating the dedi I didn't have conflict issues anyway).
Yes, you can withdraw penalties using the plugin. Just check if the driver has penalties with "mNumPenalties", and then execute a chat command to withdraw the penalty. Code /subpenalty [cod] [name] Example /subpenalty 3 Richie Spinner *Removes a penalty from the given player. The following are valid values for [cod]: 0=remove one stop/go penalty, 1=remove one drive-thru penalty, 2=remove one longest line penalty, 3=remove all penalties