Exports

Client Exports

  • Get player gang info:

-- Returns a table with player Gang info
exports['av_gangs']:getGang()
  • Get current zone:

-- If close to a graffiti it will return a string with the zone name
exports['av_gangs']:getZone()
  • Verify if current zone is controlled by the player gang:

-- Returns true if inside a zone controlled by your gang
exports['av_gangs']:myZone()
  • Get player gang level:

-- Returns number or false if not gang member
exports['av_gangs']:getGangLevel()

Server Exports

  • Get player gang info:

-- Returns a table with player gang info or false
-- player name, gang name, isBoss, gang label
exports['av_gangs']:getGang(source)
  • Get gang members count:

-- Returns number
local gangName = "ballas"
exports['av_gangs']:getMembersCount(gangName)
  • Get player gang level:

-- Returns number or false if player isn't gang member
exports['av_gangs']:getGangLevel(source)
  • Get gang graffiti count:

-- Returns current number of graffitis a gang have or 0
exports['av_gangs']:getGraffitiCount(gangName)
  • Verify if a gang exists (use it before registering a new one):

-- returns true/false
-- use gang label (example: Los Santos Vagos)
exports['av_gangs']:verifyGang(label)
  • Register a gang from a different resource:

-- Send the gang label (ex: Los Santos Vagos)
-- returns the gang name without spaces (ex: lossantosvagos), use it to set gang boss
local gangName = exports['av_gangs']:registerGang(label)
  • Set a player as gang boss:

-- exports['av_gangs']:setBoss(source,identifier,gangName,gangLabel)
local identifier = exports['av_laptop']:getIdentifier(source)
local gangLabel = "Los Santos Vagos"
local gangName = exports['av_gangs']:registerGang(gangLabel)
exports['av_gangs']:setBoss(source,identifier,gangName,gangLabel)
  • Remove a member from an external resource:

-- exports['av_gangs']:removeMember(identifier,gangName)
local identifier = exports['av_laptop']:getIdentifier(source)
local gang = exports['av_gangs']:getGang(source)
if gang and gang.name then
    local res = exports['av_gangs']:removeMember(identifier,gang.name)
    print(res) -- returns true/false
end

Last updated