Exports

Get Player Gang

-- returns nil if not a gang member or a table with the gang and player info
local gang = exports['av_gangs']:getGang()
if gang then
    print(json.encode(gang, {indent = true})
end

Get Current Zone

-- returns nil is not inside a zone or the gang that controls the zone
local zone = exports['av_gangs']:getZone()
if zone then print(zone) end

Is Player Zone

-- returns true if the current zone belongs to his gang or false
local myZone = exports['av_gangs']:myZone()
if myZone then 
    print("Is my territory")
else
    print("Territory belongs to a rival gang")
end

Get Permissions

-- returns a table with the player permissions or false if not a gang member
local permissions = exports['av_gangs']:getPermissions()
if permissions then
    print(json.encode(permissions, {indent = true})
end

Get Interior Info

-- If the player is inside a property it will return a table with the property info, returns nill if is outside
local propertyInfo = exports['av_gangs']:getInterior()
if propertyInfo then
    print(json.encode(propertyInfo, {indent = true}))
end

Last updated