Description:
Checks if a player is connected (if an ID is taken by a connected player).
Parameters:
(playerid)
playerid The ID of the player to check.
Return Values:
0: Player is NOT connected.
1: Player IS connected.
Example Usage:
Checks if a player is connected (if an ID is taken by a connected player).
Parameters:
(playerid)
playerid The ID of the player to check.
Return Values:
0: Player is NOT connected.
1: Player IS connected.
Example Usage:
- Código:
KillPlayer(playerid)
{
if(!IsPlayerConnected(playerid)) printf("Player ID %i is not connected!", playerid);
else SetPlayerHealth(playerid, 0);
}
Creditos: Wiki SA-MP