Something I don't understand with damages
#1

Hello. I've made this thing in OnPlayerTakeDamage:
Код:
    new Float:HP;
    new Float:armour;
    GetPlayerArmour(playerid, armour);
    GetPlayerHealth(playerid, HP);
    if (weaponid == 24) {
    	if (armour > 0) {
  	  	SetPlayerArmour(playerid, armour-40);
  	  	SetPlayerHealth(playerid, HP-5);
		}
		else if (armour < 0) {
		SetPlayerHealth(playerid, HP-20);//DesertEagle
		}
	}
If the player has no armour, the server is going to give him one to make the armour lose, I simply need help on it. Thank you.
Reply


Messages In This Thread
Something I don't understand with damages - by Amator - 02.06.2012, 12:19
Re: Something I don't understand with damages - by MadeMan - 02.06.2012, 12:40
Re: Something I don't understand with damages - by MP2 - 02.06.2012, 13:39
Re : Something I don't understand with damages - by Amator - 02.06.2012, 13:50
Re : Something I don't understand with damages - by Amator - 02.06.2012, 20:21

Forum Jump:


Users browsing this thread: 1 Guest(s)