Skip to content

Commit

Permalink
Added example to GetPlayers() function
Browse files Browse the repository at this point in the history
People crying about fivem documentation sucking ass, instead of fixing it and making pr themselves they just talk shit.

https://docs.fivem.net/docs/scripting-reference/runtimes/lua/functions/GetPlayers/
  • Loading branch information
Poggicek committed May 22, 2020
1 parent ec1b5c7 commit 9544a29
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -14,4 +14,10 @@ GetPlayers()
Examples
--------

TODO
```lua
for _, playerId in ipairs(GetPlayers()) do
local name = GetPlayerName(playerId)
print(('Player %s with id %i is in the server'):format(name, playerId))
-- ('%s'):format('text') is same as string.format('%s', 'text)
end
```

0 comments on commit 9544a29

Please sign in to comment.