GetPlayerState
From SA-MP Wiki
(Difference between revisions)
Revision as of 20:55, 30 July 2013 Smithy (Talk | contribs) ← Previous diff |
Revision as of 22:03, 1 February 2014 Connor Mead (Talk | contribs) (add fr link) Next diff → |
||
Line 30: | Line 30: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GetPlayerState]] |
Revision as of 22:03, 1 February 2014
Description:
Get a player's current state.
(playerid)
playerid | The ID of the player to get the current state of. |
Return Values:
The player's current state as an integer.
public OnPlayerDeath(playerid, killerid, reason) { new playerState = GetPlayerState(killerid); // Get the killer's state if (playerState == PLAYER_STATE_DRIVER) // If the killer was in a vehicle { //It's a driver-driveby, take some money GivePlayerMoney(killerid, -10000); } return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerSpecialAction: Get a player's current special action.
- SetPlayerSpecialAction: Set a player's special action.
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnPlayerStateChange: Called when a player changes state.