Need help Bro Pro.
#1

Код:
I am using this under OnPlayerTakeDamage.
					    new Float:HP,Float:A;
						GetPlayerHealth(playerid, HP);
						GetPlayerArmour(playerid,A);
						if(A >  0.0)
						{
							switch(weaponid)
							{
							case 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,42: SetPlayerArmour(playerid, A-amount);
							}
						}
						if(A <= 0.0)
						{
						    switch(weaponid)
							{
						    case 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,42: SetPlayerHealthEx (playerid, HP-amount);
							}
						}
The problem which i am getting is it refill armour or health rather than decreasing it.. Also player getting damage in Health before Armour..... why ?

Код:
SetPlayerHealthEx(playerid,Float:NewHealth)
{
	new Float:A;
	GetPlayerArmour(playerid,A);
	if(NewHealth > 99 && A <= 0.0 && JustSpawned[playerid] == 0 && onduty[playerid] == 0 && pInfo[playerid][GodMode] == 0 ) NewHealth = 99;
	if(NewHealth <= 0.0) NewHealth = 0.0;
	return SetPlayerHealth(playerid,NewHealth);
}
The armour is decrease then increase same with health .

Kindly Help me to fix that Thanks.
Reply


Messages In This Thread
Need help Bro Pro. - by MBilal - 09.10.2015, 17:21
Re: Need help Bro Pro. - by AbyssMorgan - 09.10.2015, 17:27
Re: Need help Bro Pro. - by MBilal - 09.10.2015, 17:42

Forum Jump:


Users browsing this thread: 2 Guest(s)