getPlayerGangInfoFromIdentifier

This export returns the players gang information from their identifier

Usage

local playerGangInfo = exports.gfg_gangs:getPlayerGangInfoFromIdentifier(identifier)
  • identifier: string (The identifier of the player whose gang you wish to retrieve)

Returns: table

  • name: string (The name of the gang the player is in)

  • rank: int (The rank of the player)

This requires the players identifier that you wish to retrieve.

Example

local xPlayer = ESX.GetPlayerData()
local playerGangInfo = exports.gfg_gangs:getPlayerGangInfoFromIdentifier(xPlayer.identifier)

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

--[[
    playerGangInfo = {
        name = gfg,
        rank = 1
    }
]]

Last updated