[HELP] Taser
#1

Where can be problem, when a player is lying and he is not up, although timers are.


Code:
if(newkeys & KEY_FIRE)
	{
		if(HaveTaser[playerid] == 1)
		{
 			ApplyAnimation(playerid,"KNIFE","knife_3",4.1,0,1,1,0,0,1);
      		SetTimerEx("TimerClear",2000,false,"d",playerid);
		    new victimid = GetClosestPlayer(playerid);
			if(IsPlayerConnected(victimid))
	     	{
	        	if(GetDistanceBetweenPlayers(playerid,victimid) < 2)
	            {
	            	new Float:health;
	                GetPlayerHealth(victimid, health);
	                SetPlayerHealth(victimid, health - 5.0);
	                SetTimerEx("TimerFall",300,false,"d",victimid);
	                return 1;
	             }
	         }
         }
	}
	return 1;
}

public TimerClear(playerid)
{
	ClearAnimations(playerid,1);
}

public TimerFall(playerid)
{
    ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
Reply
#2

Maybe can be problem with :


Code:
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
because I change this.
Reply
#3

Anyone?
Reply
#4

[QUOTE=V4at;1781673]Where can be problem, when a player is lying and he is not up, although timers are.
/QUOTE]

I can't understand this ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)