mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
ox_core/player/server docs
This commit is contained in:
1 parent
4522a76f69
commit
355d7eb052
2 files changed
+93
No files matched your search
@@ -2,3 +2,25 @@
|
||||
title: Server
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
## Ox.GetPlayer
|
||||
|
||||
Return an instance of CPlayer for the given player source.
|
||||
|
||||
```lua
|
||||
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.
|
||||
|
||||
```lua
|
||||
local players = Ox.GetPlayers(usemetatable)
|
||||
|
||||
for i = 1, #players do
|
||||
local player = players[i]
|
||||
print(json.encode(player, { indent = true }))
|
||||
end
|
||||
```
|
||||
Reference in new issue
Block a user