GetPlayerArmour
From SA-MP Wiki
(Difference between revisions)
Revision as of 16:32, 28 October 2013 Badio12 (Talk | contribs) ← Previous diff |
Revision as of 22:46, 31 January 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|This function stores the armour of a player into a variable.}} | {{Description|This function stores the armour of a player into a variable.}} | ||
Line 24: | Line 23: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GetPlayerArmour]] | ||
[[pt:GetPlayerArmour]] | [[pt:GetPlayerArmour]] | ||
[[ru:GetPlayerArmour]] | [[ru:GetPlayerArmour]] |
Revision as of 22:46, 31 January 2014
Description:
This function stores the armour of a player into a variable.
(playerid, &Float:armour)
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:
The function itself doesn't return a specific value. The player's armour is stored in the specified variable.
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.