Files
overextended.github.io/docs/ox_core/Player/Server/index.md
T
2022-06-29 16:50:59 +10:00

497 B

title, sidebar_position
title sidebar_position
Server 1

Ox.GetPlayer

Return an instance of CPlayer for the given player source.

local player = Ox.GetPlayer(source)
print(json.encode(player, { indent = true }))

Ox.GetPlayers

Returns an array containing all players. Methods will not be applied if the first argument is false.

local players = Ox.GetPlayers(usemetatable)

for i = 1, #players do
    local player = players[i]
    print(json.encode(player, { indent = true }))
end