Client Callbacks
List of useful callbacks included with this resource utilising ox_lib (opens in a new tab), to be used on the client side.
⚠️
These callbacks should not be triggered unless the player is in an arena.
With the only exception being
fetchHistory. Use in conjunction
with the client export isPlayerInArena().
ls-arcade:fetchArenaidentifier
Fetches the players arena identifier.
local identifier = lib.callback.await('ls-arcade:fetchArenaidentifier', false)ls-arcade:fetchArenaData
Fetches the arena data of identifier passed as an argument.
local identifier = lib.callback.await('ls-arcade:fetchArenaidentifier', false)
local arenaData = lib.callback.await('ls-arcade:fetchArenaData', false, identifier)Return:
- arenaData:
tablearena data table structure
ls-arcade:fetchPlayerList
Fetches the player list of the arena identifier passed as an argument.
local identifier = lib.callback.await('ls-arcade:fetchArenaidentifier', false)
local playerList = lib.callback.await('ls-arcade:fetchPlayerList', false, identifier)Return:
- playerList:
table- src:
table- loadout:
number - netId:
number - src:
number - team:
number
- loadout:
- src:
ls-arcade:fetchTeams
Fetches the team list of the arena identifier passed as an argument
local identifier = lib.callback.await('ls-arcade:fetchArenaidentifier', false)
local teams = lib.callback.await('ls-arcade:fetchTeams', false, identifier)Return:
- teams:
table- 1:
table- src:
table- name:
string - src:
number
- name:
- src:
- 2:
table- src:
table- name:
string - src:
number
- name:
- src:
- 1:
ls-arcade:isHost
Returns whether or not the player is the host of the arena
local identifier = lib.callback.await('ls-arcade:fetchArenaidentifier', false)
local isHost = lib.callback.await('ls-arcade:isHost', false, identifier)Return:
- isHost:
boolean
ls-arcade:server:fetchHistory
Returns the match history of any lobbies that were active since server restart.
local scoreboard = lib.callback.await('ls-arcade:server:fetchHistory', false)Return:
- scoreboard:
table- identifier:
table <string>- label:
string - gamemode:
string - winner:
string - identifier:
string - scores:
table- src:
table <number>- name:
string - score:
number
- name:
- src:
- label:
- identifier: