SA-MP Forums Archive
+5 Armour - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: +5 Armour (/showthread.php?tid=219476)



+5 Armour - Ihsan-Cingisiz - 01.02.2011

Hello,

How can I do that I can give someone 5% armour extra?
I tried this: SetPlayerArmour(playerid, +=5);
But that doesn't work, what should I do instead of what I
did?

K. Regards,
I. C.


Re: +5 Armour - Fj0rtizFredde - 01.02.2011

Like this
pawn Код:
new Float:armour;
GetPlayerArmour(playerid, armour);
SetPlayerArmour(playerid, armour+5);



Re: +5 Armour - Ihsan-Cingisiz - 01.02.2011

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
Like this
pawn Код:
new Float:armour;
GetPlayerArmour(playerid, armour);
SetPlayerArmour(playerid, armour+5);
Thanks


Re: +5 Armour - viKKmaN - 01.02.2011

pawn Код:
new Float:armour;
GetPlayerArmour(playerid, armour);
SetPlayerArmour(playerid, armour+5);
This is +5 Armor.

pawn Код:
new Float:pArmour;
GetPlayerArmour(playerid, pArmour);
SetPlayerArmour(playerid, pArmour+(5*pArmour)/100);
This is +5% Armor.


Re: +5 Armour - Ihsan-Cingisiz - 01.02.2011

Quote:
Originally Posted by viKKmaN
Посмотреть сообщение
pawn Код:
new Float:armour;
GetPlayerArmour(playerid, armour);
SetPlayerArmour(playerid, armour+5);
This is +5 Armor.

pawn Код:
new Float:pArmour;
GetPlayerArmour(playerid, pArmour);
SetPlayerArmour(playerid, pArmour+(5*pArmour)/100);
This is +5% Armor.
It was actually just 5, i thought i must say it in %'s, thanks anyway