AV Scripts
StoreDiscord
  • Documentation
  • Guides
    • Dealerships
      • Installation
      • Admin Panel
        • All Vehicles
        • Dealerships
        • Auctions
      • Dealership Panel
        • Overview
        • Auctions
        • Employees
        • Orders
        • Payments
        • Showroom
        • Warehouse
        • Pre Owned
        • Settings
      • Buy/Sell Vehicles
      • Catalogue
      • Exports
      • FAQ
    • House Robbery
      • Installation
      • Add Shells
      • Dispatch
      • Exports
      • Weather
      • Minigames
      • Notifications
      • New Houses
      • Object Types
      • Sell Items
    • Illegal Runs
      • Installation
      • Customization
      • Ox Inventory
      • QB Inventory
    • Multicharacter
      • Installation
      • Character Slots
      • Clothes
      • Scenes
        • Previews
      • Exports
      • Weather
    • Paleto Heist
      • Buy here
    • Refund System
      • Installation
        • Inventories
    • Tuning Script
      • Installation
      • Events and Controls
      • Exports
      • Price Multiplier
    • Vehicleshop
      • Installation
      • Admin Panel
      • Addon Vehicles
      • Functions
        • Fuel
        • Keys
        • VIP
        • Weather
      • Garages
      • HUD
      • Society
    • Weather Script
      • Installation
      • Breath Condensation
      • Fog
      • Real Time Sync
      • Exports
    • VIP Script
      • Installation
      • Exports
      • Categories
      • Admin
      • Tebex
      • Free Tokens
  • LAPTOP PACK V3
    • Laptop v3
      • Installation
        • Inventory
        • Cosmo
        • Permissions
        • QBCore
        • Custom Framework/Inventory
        • Phone
        • Translate
      • Browser
      • Terminal
      • Documents
      • APPs Config
      • Exports
    • Boosting
      • Create Profile
      • APP
      • Contracts
      • Dispatch
      • Lockpick Export
      • VIN Export
    • Business
      • Installation
        • Inventories
          • Origen Inventory
            • ESX
            • QBCore
          • OX Inventory
          • QB/PS/LJ Inventory
          • Quasar Inventory
            • ESX
            • QBCore
          • Codem Inventory
          • Tgiann Inventory
        • ESX
      • Admin Panel
        • Create Zones
        • Edit Zones
      • Config
        • Animations
        • Blips
        • Buttons
        • Crafting
        • Effects
        • Events
          • Items
          • Zones
        • Logs
          • Custom Logs
        • Permissions
      • Exports
      • Banking Scripts
      • Multijobs
    • Cameras
      • Installation
        • Vehicle Cameras
      • Place Camera
      • Job Cameras
    • Drugs
      • Installation
      • Admin Panel
      • APP
      • Tables
      • Labs
        • PC
        • Raids
      • Alert Cops
      • Shells
      • Exports
    • Gangs
      • Installation
      • Admin Panel
        • Gangs
        • Whitelist
      • Properties
      • Register Gang
      • APP
        • Members
        • Settings
        • Missions
        • Blackmarket
        • Properties
      • Graffitis
      • Missions
      • Gang NPC
      • Shells
      • Exports
      • Labs
    • Groups
      • Events
      • Exports
    • Music
      • Installation
      • Music Labels
      • APP
        • Search Music
        • Playlists
        • Headphones
      • CDs
    • Racing
      • Installation
        • Permissions
        • Discord Logs
        • Addon Vehicles
      • Admin Panel
      • Categories
      • Events
      • Exports
      • Personal Settings
      • The Underground
    • Custom APPs
    • Discord Support
Powered by GitBook
On this page
  1. LAPTOP PACK V3
  2. Gangs

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

Get Player Gang

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

Get Gang Info

-- Returns a table with the gang main info or false if doesn't exists
local gang = "Los Santos Vagos"
local info = exports['av_gangs']:getGangByName(gang)
if info then
    print(json.encode(info, {indent = true}))
end

Register Gang

-- Returns false if the gang already exists or true to confirm it was created.
-- boss is the player id to set as boss or send false
local name = "Los Santos Vagos"
local boss = source
local res = exports['av_gangs']:registerGang(name,source)
if res then
    print("Gang registered!")
end

Set Gang Boss

-- returns true or false
local src = source
local gang = "Los Santos Vagos"
local res = exports['av_gangs']:setBoss(gang,src)
if res then
    print("added as boss!")
end

Get Gangs Names

-- Returns a table with all gang names (NOT labels)
local allGangs = exports['av_gangs']:getGangNames()
print(json.encode(allGangs, {indent = true}))

Get Gang Graffitis

-- Returns the amount of gang graffitis
local gang = "Los Santos Vagos"
local graffitis = exports['av_gangs']:getGraffitis(gang)
print(graffitis)

Add Gang XP

-- Adds XP to the gang
-- You can skip the daily limit if you send true as 3rd argument
local gang = "Los Santos Vagos"
local toAdd = 500
local skipDaily = true
local added = exports['av_gangs']:addXP(gang,toAdd,skipDaily)
if added then
    print("XP added")
else
    print("Gang doesn't exist")
end

Remove Gang XP

-- Removes XP to the gang
local gang = "Los Santos Vagos"
local toRemove = 200
local removed = exports['av_gangs']:removeXP(gang,toRemove)
if removed then
    print("XP Removed")
else
    print("Gang doesn't exist")
end

Get Gang XP

-- Returns the player influence points
-- If u want the level divide the value by Config.LevelXP (2500 by default)
local gang = "Los Santos Vagos"
local influence = exports['av_gangs']:getGangXP(gang)
local level = 0
if influence and influence > 0 then
    level = math.floor((influence / 2500))
end

Get Gang Members

-- Returns a table with all players info from a gang or false
local gang = "Los Santos Vagos"
local members = exports['av_gangs']:getMembers(gang)
if members then
    print(json.encode(members, {indent = true}))
end

Last updated 10 months ago