Confused.
#1

So I made a /takedrugs command, it works perfectly, par the fact that when you /takedrugs, it sets your armour to whatever the setarmour does, the only problem is, it should add it to your existing armour.

pawn Код:
SetPlayerArmour(playerid, GetPlayerArmour(playerid) + 1.2*drugamount);
That's the line.
+rep if you help.
Reply
#2

pawn Код:
new Float:armour;
GetPlayerArmour(playerid, armour)
SetPlayerArmour(playerid, armour + 1.2*Float:drugamount);
I suppose that drugamount is an Integer, so that's why the 'Float:' is placed infront of it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)