Exports

Server Sided exports

exports.rk_factions:GetPlayerFInfo(playerId)

Parameters:

  • source (number): The player's server ID

Returns:

  • nil: if player is not found, has no identifer, or not in a faction.

  • table: If player is in a faction returns:

- inFaction (boolean): Always true when returned true
- factionId (number): The Faction's id (stored in db)
- factionName (string): The faction's name
- rank (string): The player's rank in the faction

Example:

local factionInfo = exports.rk_factions:GetPlayerFInfo(playerId)
    if factionInfo then
        print("Player is in faction: " .. factionInfo.factionName)
        print("Rank: " .. factionInfo.rank)
    end

Last updated