getGangInfoFromName

This export returns the gang info from the gangs name

Usage

local gangInfo = exports.gfg_gangs:getGangInfoFromName(name)
  • name: string (The gang whose info you wish to retrieve)

Returns: table

  • id: int (The id of the gang)

  • name: string (The name of the gang)

  • label: string (The label of the gang)

  • reputation: int (The reputation of the gang)

Example

-- This gets the current player gang
local playerGang = exports.gfg_gangs:getPlayerGangInfoFromId()

-- This gets the gang info from the current players gang
local playerGangInfo = exports.gfg_gangs:getGangInfoFromName(playerGang.name)

print("Player Gang Info:")
print(json.encode(playerGangInfo, {indent = true}))

--[[
    playerGangInfo = {
        id = 1,
        name = "gfg",
        label = "GFG",
        reputation = 100
    }
]]

Last updated