22.04.2015, 13:29
Okay i'm trying to make something epic.. when he shots his chest only the armor get lost not their health okay here's my code
i made it for bodypart 3 and 4 only, it works perfect but when the armor's gone to 0 it returns again to 1000 i've tried multipe times to make it but i failed and one more thing i don't want the damage to be -25 can i make it to regular damage, i tried return 1; but it doesn't work i think there's a messing part please answer me as soon as possible
Код:
if(issuerid != INVALID_PLAYER_ID && weaponid == 22 && bodypart == 4) { new Float:ARMOR; GetPlayerArmour(playerid, ARMOR); if(ARMOR > 0) { SetPlayerArmour(playerid, -26); } if(ARMOR == 0) { new Float:HP; RemovePlayerAttachedObject(playerid,1); RemovePlayerAttachedObject(playerid,6); HasArmour[playerid] = 0; GetPlayerHealth(playerid, HP); SetPlayerHealth(playerid, HP-60); SetPlayerDrunkLevel(playerid, 500000); TextDrawShowForPlayer(playerid, Danio); TT[playerid] = SetTimerEx("Damage", 250, 1, "i", playerid); TC[playerid] = SetTimerEx("Blood", 10000, 1, "i", playerid); } }