deleteGangRank

This deletes the gang from the gangs name

Usage

exports.gfg_gangs:deleteGangRank(id)
  • id: int (The if of the rank you wish to delete)

Utilizing this export will also set all members of that rank to the "none" gang (default) with a rank of 0.

Example

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

-- This Retrieves all the rank data from the players gang
local playerGangRanks = exports.gfg_gangs:getGangRankData(playerGang.name)

-- This finds the current players rank data from his rank.
for _, rank in pairs(PlayerGangRanks) do
    if playerGang.rank == rank.rank then
        rankToDelete = rank
    end
end

-- This deletes the rank
exports.gfg_gangs:deleteGangRank(rankToDelete.id)

Last updated