How do I add armour to a player? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How do I add armour to a player? (
/showthread.php?tid=377108)
How do I add armour to a player? -
Jarred Miller - 12.09.2012
public OnPlayerDeath(playerid,killerid,reason)
{
SetPlayerArmour(killerid,15);
SendClientMessage(killerid, COLOR_MexicanColor, "Nice shot!");
return 1;
}
current script is this. I know that it will set their armour to 15 even if it's above 15. How do I make it so that it actually gives them 15 armour for every kill?
Re: How do I add armour to a player? -
antonio112 - 12.09.2012
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
new Float:armour;
GetPlayerArmour(killerid, armour);
SetPlayerArmour(killerid, armour + 15.0);
SendClientMessage(killerid, COLOR_MexicanColor, "Nice shot!");
return 1;
}