(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
#2

oo i forgot
if the playerid hit (touche ) the targetid & then kill him thanks to distance ! the playerid score 1
is that possible to make some thing like
GetPlayerHealth(target,hp);
Код:
if(hp(target hp) = 0) 
{
new score = GetPlayerScore(playйrid);
SetPlayerScore(playйrid, score+ 1);
}
or some thing like that
Reply
#3

com on pls some one help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)