This resource contains a few client side and server side exports that can be used in other resources.
Client
AtWar
Returns true or false if the player is at war with any gang
--- AtWar
--- Returns true or false if the player is at war with any gang
--- @usage exports.gs_gangwars:AtWar()
if exports.gs_gangwars:AtWar() then
    print('At war')
endAtWarWith
Returns true or false if the player is at war with the specified gang
--- AtWarWith
--- Returns true or false if the player is at war with the specified gang
--- @usage exports.gs_gangwars:AtWarWith('gangname')
if exports.gs_gangwars:AtWarWith('gangname') then
    print('At war with gangname')
endGetCurrentZone
Returns the current zone the player is in and the data of that zone if any otherwise nil
--- GetCurrentZone
--- Returns the current zone the player is in and the data of that zone if any otherwise nil
--- @usage local zone, data = exports.gs_gangwars:GetCurrentZone()
local zone, data = exports.gs_gangwars:GetCurrentZone()
if zone then
    print('Current zone', zone, json.encode(data))
endServer
AtWar
Similar to the client side "AtWarWith" export but requires two params and returns true or false.
--- AtWar
--- Returns true or false if both gangs are at war
--- @usage exports.gs_gangwars:AtWar('gangname1', 'gangname2')
if exports.gs_gangwars:AtWar('gangname1', 'gangname2') then
    print('Both gangs are at war with eachother')
endLast updated