GetPlayerArmour
Description:
Function GetPlayerArmour stores the armour of a player into a variable.
|
Parameters:
(playerid, &Float:armour)
int | playerid | The ID of the player that you want to get the armour of. |
float | armour | The float to to store the armour in, passed by reference. |
Return Values:
- 1 - success
- 0 - failure (i.e. player not connected).
Examples:
new Float:armour; GetPlayerArmour(playerid, armour); new s[40]; format(s, sizeof(s), "SERVER: Your armour is %0.f percent", armour); SendClientMessage(playerid, 0xFFFFFFAA, s);
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetPlayerArmour: Set the armour of a player.
- GetPlayerHealth: Find out how much health a player has.
- GetVehicleHealth: Check the health of a vehicle.