State Bags
Player state used by Possible Gang Wars.
The resource folder on your server must be named exactly possible_wars.
inActiveWar
Set by the server when a player's gang is in an active war. Cleared to nil when the war ends (or on refresh if they are not in one).
| Value | Description |
|---|---|
true | Gang is in an active war |
nil | Not in a war |
if LocalPlayer.state.inActiveWar then print('In an active gang war')end
AddStateBagChangeHandler('inActiveWar', ('player:%s'):format(GetPlayerServerId(PlayerId())), function(bagName, key, value) if value then print('War started / synced') else print('War ended / cleared') endend)Wars may also read LocalPlayer.state.dead when DeathDetectionMethod = "statebag" is set in config. That bag is owned by your ambulance / death script, not by Gang Wars.
