17.09.2011, 07:48
Hello, well im trying to make a drug give player armour when he uses it, it should give him +3% of armour, but if the player already has 30% of armour the drug shouldent give him no armour, here is my code, I tried to set something myself but fail(never had deals with this kinda thing)
Код:
Crackeffect(playerid) { if (GetPlayerArmour(playerid)<1) { Jizzing[playerid] = SetTimerEx("EffectTime0",JIZZTIME,0,"i",playerid); SendClientMessage(playerid, COLOR_WHITE, "You started using {FF9900}crack"); SetPlayerDrunkLevel (playerid, 6000); SetPlayerWeather(playerid, -66); SetPlayerArmour(playerid,+3.0); SetPVarInt(playerid,"usingdrugs",1); } else if (GetPlayerArmour(playerid)>29) { SendClientMessage(playerid,0xFFFFFFFF,"You cant reach a higher armour level from now."); } }