-
-
Notifications
You must be signed in to change notification settings - Fork 60
Traffic Advisor
The "traffic_advisor" plugin is designed for extra toggling in order to activate certain rear traffic advisory lights. It works by placing light meshes under certain extras then toggling those extras to reveal or hide certain sirens.
⚠️ Notice: This requires the vehicle to already have working Traffic Advisor extras! LVC does not add a traffic advisor to vehicle which do not already have one.
-
Ensure that
plugins_installed
is set to true inlvc/SETTINGS.lua
. -
Open the SETTINGS.lua located in
lvc/plugins/traffic_advisor
. Adjust settings to your liking. -
Now configure the TA_ASSIGNMENTS table to your liking. The TA Assignments table is very dynamic an allows for multiple set up variations.
Example:TA_ASSIGNMENTS = { ['DEFAULT'] = { }, ['gameName'] = { lightbar = 3, left = { on = { add = 8, remove = 7, repair = true }, off = { add = {}, remove = { 7, 8 } } }, right = { on = { add = 7, remove = 8, repair = true }, off = { add = {}, remove = { 7, 8 } } }, middle = { on = { add = { 7, 8 }, remove = {}, repair = true }, off = { add = {}, remove = { 7, 8 } } }, }, }
A lightbar key is used to ensure that the parent extra (a lightbar / TA bar) is present before toggling. This can be disabled by setting equal to '-1' if the TA lightbar is attached to the base model and not an extra.
An on and off key will be called on TA state change.
An add and remove key will add the passed extra(s) and remove passed extras(s) based on the TAs on/off state.
⚠️ Instead of leaving an unneeded add / remove state please use{}
to identify as unneeded. e.g (on = { add = 8, remove = {} }
)- Single Example:
on = { add = 1, remove = 2 }
- Multiple Example:
on = { add = { 1, 3 }, remove = { 2, 4 } }
A repair flag can optionally be added for higher poly extras. GTA will set extras of low poly items without repairing the vehicle, however for things like spotlights, lightbars, etc. the repair flag may need to be set. By default
repair
is set to disabled, to override addrepair = true
somewhere inside the desired trigger table. This should only be needed when adding extras.- Examples:
on = { add = 1, remove = {}, repair = true }
on = { add = { 5 }, remove = { 6 }, repair = true }
- Single Example:
-
Finished ✅