What are listeners?
Listeners are function references that get triggered when a specific action is done by the system, and can be registered on the Server Side OnlyAvailable Listeners
These are the current listeners available to you
onTerritoryChange
onSpray
onWarKill
onWarStarted
onWarEnd
onActivityCompletion
onNeutralZoneCapture
onTrapHouseBought
onTrapHouseSold
onTrapHouseUpgrade
onTrapHouseDowngrade
onHookerHire
onHookerFire
onDrugSlingerPurchase
onDrugSlingerSell
onDrugSlingerDrugSell
Example
local listener = exports['veil-gangs']:registerListener('onSpray', function(payload)
print('Spray event received')
print(payload)
if (type(payload) == 'table') then
for k,v in pairs(payload) do
print(k,v)
end
end
end)
This outputs the following
Spray event received
table: 00000000495CF7C0
spray_id 4
enemyGang
inEnemyTurf false
gang ballas
coords vec3(1717.445923, 2142.495361, 83.245163)
source 1
The following are the listeners and the data they provide