SetPlayerArmour
From SA-MP Wiki
(Difference between revisions)
Revision as of 14:54, 31 December 2013 Connor Mead (Talk | contribs) ← Previous diff |
Revision as of 14:56, 31 December 2013 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | {{ScriptingFR}} | + | {{Scripting}} |
{{Title}} | {{Title}} | ||
- | {{Description|SetPlayerArmour change la valeur d'armure d'un joueur.}} | + | {{Description|SetPlayerArmour will allow you to change the players armour amount.}} |
{{Parameters|playerid, Float:armour}} | {{Parameters|playerid, Float:armour}} | ||
- | {{Param|playerid|Le joueur dont l'armure sera modifiée.}} | + | {{Param|playerid|The player you want to change the armour of.}} |
- | {{Param|Float:armour|La nouvelle valeur d'armure en float.}} | + | {{Param|Float:armour|The new armour you want to give a player as a float.}} |
- | + | {{NoReturn}} | |
- | {{NoReturnFR}} | + | |
- | + | ||
<pawn> | <pawn> | ||
- | if (strcmp(cmdtext, "/armour", true) == 0) | + | Ligne 14: |
{ | { | ||
- | SetPlayerArmour(playerid, 100.0); | + | SetPlayerArmour(playerid, 100.0); |
- | SendClientMessage(playerid, 0xFFFFFFAA, "Armure réstaurée!"); | + | SendClientMessage(playerid, 0xFFFFFFAA, "Armour restored!"); |
- | return 1; | + | return 1; |
} | } | ||
- | </pawn> | + | </pawn> |
- | + | {{RelatedFunctions}} | |
- | {{RelatedFunctionsFR}} | + | {{GetPlayerArmour}} |
- | *[[GetPlayerArmour_FR|GetPlayerArmour]] | + | {{SetPlayerHealth}} |
- | *[[SetPlayerHealth_FR|SetPlayerHealth]] | + | {{GetPlayerHealth}} |
- | *[[GetPlayerHealth_FR|GetPlayerHealth]] | + | |
- | + | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] |
Revision as of 14:56, 31 December 2013
Description:
SetPlayerArmour will allow you to change the players armour amount.
(playerid, Float:armour)
playerid | The player you want to change the armour of. |
Float:armour | The new armour you want to give a player as a float. |
Return Values:
This function does not return any specific values.
Ligne 14: { SetPlayerArmour(playerid, 100.0); SendClientMessage(playerid, 0xFFFFFFAA, "Armour restored!"); return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetPlayerArmour: Find out how much armour a player has.
- SetPlayerHealth: Set a player's health.
- GetPlayerHealth: Find out how much health a player has.