25.10.2015, 08:26
Armour & Health Functions
That functions will give extra health or armour to players, for example if a player has 10 health and you use GivePlayerHealth(playerid, 10); somewhere in your script it will set player's health to 20, the same will happen with the armour function
If the amount isn't higher than the current health/armour it won't process the function, if you want to remove this part just remove if declare
GivePlayerArmour FunctionThat functions will give extra health or armour to players, for example if a player has 10 health and you use GivePlayerHealth(playerid, 10); somewhere in your script it will set player's health to 20, the same will happen with the armour function
If the amount isn't higher than the current health/armour it won't process the function, if you want to remove this part just remove if declare
Код:
stock GivePlayerArmour(playerid, amount)
{
new Float:armour;
GetPlayerArmour(playerid, armour);
if (armour < amount)
{
SetPlayerArmour(playerid, armour + amount);
}
return 1;
}
Код:
stock GivePlayerHealth(playerid, amount)
{
new Float:health;
GetPlayerHealth(playerid, health);
if (health < amount)
{
SetPlayerHealth(playerid, health + amount);
}
return 1;
}

