R_FFA
r_ffa Exports
Client and server exports for r_ffa: check whether a player is in an arena, read their lobby or game mode, and count players per lobby.
Client exports
isInFFA
Returns whether the local player is currently inside an arena (FFA lobby or duel).
local inArena = exports.r_ffa:isInFFA()| Returns | Description |
|---|---|
boolean | true while the player is in a lobby |
GetGameMode
local mode = exports.r_ffa:GetGameMode()| Returns | Description |
|---|---|
'ffa' | In a public or custom lobby |
'1v1' | In a wager duel |
nil | Not in an arena |
GetSession
Returns the full session table or nil.
local session = exports.r_ffa:GetSession()
-- session.lobbyId, session.kind ('public' | 'custom' | 'duel'), session.label,
-- session.arena (arena key), session.weapons, session.armor, session.kills, session.deaths, session.streakServer exports
GetTotalPlayerCount
local total = exports.r_ffa:GetTotalPlayerCount()Number of players across every lobby and duel.
GetLobbyPlayerCount
local count = exports.r_ffa:GetLobbyPlayerCount('paleto_pistols')Players in one lobby by its id (public lobbies use the id from R.Lobbies).
IsPlayerInFFA
local inArena = exports.r_ffa:IsPlayerInFFA(source)GetPlayerLobby
local lobby = exports.r_ffa:GetPlayerLobby(source)
-- { id = 'custom_3', kind = 'custom', label = 'Pistols only', arena = 'paleto', players = 6 } or nilNeed help?
Common Issues
Check the troubleshooting guide