From SA-MP Wiki
|Tip: This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in.|
This function can be used to check if a player is connected to the server via SA:MP.
|playerid||The playerid you would like to check.|
|Returns||Returns true if the player is connected and false if the player is not.|
if(!IsPlayerConnected(3)) SendClientMessageToAll(0xFFFFFFFF, "SERVER: I miss ID 3 :(");
The following functions may be useful, as they are related to this function in one way or another.
- IsPlayerAdmin: Checks if a player is logged into RCON.
The following callbacks might be useful, as they're related to this function in one way or another.
- OnPlayerConnect: Called when a player connects to the server.
- OnPlayerDisconnect: Called when a player leaves the server.