(HELP) kills problem
#1

hi all . i have a problem this is the code
Код:
    if((newkeys & KEY_FIRE) && (team[playerid] == 6))
	{
	    new Float:hp, Float:a;
      	new target = GetClosestPlayer(playerid);
      	if(GetDistanceBetweenPlayers(playerid,target) <= 1)
		{
		    GetPlayerArmour(target,a);
 			if(a > 0)
			{
			    SetPlayerArmour(target, a-20);
			    GetPlayerHealth(playerid,hp);
			    SetPlayerHealth(playerid, hp+5);
			}
			else
			{
		    	GetPlayerHealth(target,hp);
		    	SetPlayerHealth(target, hp-7);
				GetPlayerHealth(playerid,hp);
				if(hp < 200) SetPlayerHealth(playerid, hp+10);
				GetPlayerHealth(target,hp);
			}
		}
the problems is some times (if the the playerid doesn't touche the targerid withe hits ) the targetid die but it's not because of the playerid ! it's just caus the tagetid losse all he's HP caus of the distance
can some one help
Reply


Messages In This Thread
(HELP) kills problem - by Amine_Mejrhirrou - 24.01.2011, 19:38
Re : (HELP) kills problem - by Amine_Mejrhirrou - 24.01.2011, 20:04
Re : (HELP) kills problem - by Amine_Mejrhirrou - 25.01.2011, 05:43

Forum Jump:


Users browsing this thread: 1 Guest(s)