From SA-MP Wiki

Jump to: navigation, search



This function can be omitted in a lot of cases. Many other functions already have some sort of connection check built in.


Checks if a player is connected (if an ID is taken by a connected player).

playeridThe ID of the player to check.

Return Values:

  • 0: Player is NOT connected.
  • 1: Player IS connected.

Example Usage:

    if(!IsPlayerConnected(playerid)) printf("Player ID %i is not connected!", playerid);
    else SetPlayerHealth(playerid, 0);

Related Functions

The following functions may be helpful as they relate to this function in one way or another.

Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools
In other languages