Scripting/Server/Functions/GetPlayers
Number of connected players.
Syntax
GetPlayers()GetPlayerCount()Returns
integer
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "getplayers" )
{
local result = GetPlayers();
MessagePlayer( "GetPlayers returned: " + result, player );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- FindPlayer
- FindVehicle
- FindObject
- FindPickup
- FindSphere
- FindBlip
- FindNPC
- GetMaxPlayers
- GetClosestPlayer
- GetVehicleCount
- GetObjectCount
- KickPlayer
Section: Finding and counting entities
Categories: Server functions | Finding and counting entities