Перейти к основному содержимому

GetPlayerState

Description

Get a player's current state.

NameDescription
playeridThe ID of the player to get the current state of.

Returns

The player's current state as an integer (see: Player States).

Examples

public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
new PLAYER_STATE:state = GetPlayerState(killerid); // Get the killer's state

if (state == PLAYER_STATE_DRIVER) // If the killer was in a vehicle
{
//It's a driver drive-by, take some money
GivePlayerMoney(killerid, -10000);
}
return 1;
}