SetPlayerSpecialAction

From SA-MP Wiki

Jump to: navigation, search


Description:

This function allows to set players special action.


Parameters:
(playerid, actionid)
playeridThe player that should perform the action
actionidThe action that should be performed.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the player is not connected.


Image:32px-Ambox_warning_orange.png

Notes

  • Doesn't work in OnPlayerSpawn or OnPlayerStateChange with PLAYER_STATE_SPAWNED.
  • Removing jetpacks from players by setting their special action to 0 causes the sound to stay until death.


Example Usage:

if(strcmp(cmd, "/handsup", true) == 0)
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
    return 1;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages