problem on 1 animation loop
#1

as the tittle say , i got problem after put animation code to my GM

Код:
public OnPlayerUpdate(playerid)
{
	new Float:health;
	GetPlayerHealth(playerid, health);
	if(health <= 50 && health >= 1)
	{
		SetPlayerWeather(playerid, -66);
		SetPlayerTime(playerid, 12, 0);
		SetPlayerDrunkLevel(playerid, 9000);
		GameTextForPlayer(playerid, "~r~Injured~n~~w~buy some food to restore your health!", health <= 50 && health >= 1, 3);
		ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
	}
	else if(health >= 50)
	{
		new hour, minute, second;
		gettime(hour, minute, second);
		SetPlayerTime(playerid, hour, minute);
		SetPlayerWeather(playerid, gWeather);
		SetPlayerDrunkLevel(playerid, 0);
	}
I want the anim is looping in 10 second so the player can attack other and he will fall in 10 second. but after i test it , it was looping about 1 second maybe because after the animation fall done , it repeat again.

What should i do ?
Reply
#2

settimer maybe
Reply
#3

Change ur ApplyAnimation code to this
pawn Код:
ApplyAnimation(playerid,"KNIFE","KILL_Knife_Ped_Die",4.1,0,1,1,1,10000);
Its because you're set true on your loop parameter.
pawn Код:
(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync)
Then, it'll be never-ending anim
I set the freeze to false too, because if its true, player will be freezed after anim done.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)