how to sitch to the next animation
#1

hey guys how to do this : when player use de /ya cmd first animtion wil be run like ApplyAnimation(playerid,"BLOWJOBZ","BJ_COUCH_STAR T_W",4.0, 0, 0, 0, 0,0);

then when thats anime is over the next animation automaticly will run affter that like

ApplyAnimation(playerid,"BLOWJOBZ","BJ_COUCH_LOOP_ W ",4.0, 0, 0, 0, 0,0);

and then its over
Reply
#2

You could set a timer depending on how long the first animation is.
Reply
#3

You can use a timer but you need to know the length of the first animation. Say the length of the first animation is 3 seconds.

At top of the script:
Код:
new timer[MAX_PLAYERS];;
Then comes your command:
Код:
if(!strcmp(cmdtext,"/ya",true))
{
	ApplyAnimation(playerid,"BLOWJOBZ","BJ_COUCH_START_W",4.0, 0, 0, 0, 0,0);
	timer[playerid] = SetTimerEx("ana",3010,0,"i",playerid);	
	return 1;
}
The function:
Код:
ana(playerid)
{
	ApplyAnimation(playerid,"BLOWJOBZ","BJ_COUCH_LOOP_W ",4.0, 0, 0, 0, 0,0);
	KillTimer(timer[playerid]);
	return 1;
}
Reply
#4

Quote:
Originally Posted by DJDhan
Посмотреть сообщение
You can use a timer but you need to know the length of the first animation. Say the length of the first animation is 3 seconds.

At top of the script:
Код:
new timer[MAX_PLAYERS];;
Then comes your command:
Код:
if(!strcmp(cmdtext,"/ya",true))
{
	ApplyAnimation(playerid,"BLOWJOBZ","BJ_COUCH_START_W",4.0, 0, 0, 0, 0,0);
	timer[playerid] = SetTimerEx("ana",3010,0,"i",playerid);	
	return 1;
}
The function:
Код:
ana(playerid)
{
	ApplyAnimation(playerid,"BLOWJOBZ","BJ_COUCH_LOOP_W ",4.0, 0, 0, 0, 0,0);
	KillTimer(timer[playerid]);
	return 1;
}
where to put that function
Код:
ana(playerid)
{
	ApplyAnimation(playerid,"BLOWJOBZ","BJ_COUCH_LOOP_W ",4.0, 0, 0, 0, 0,0);
	KillTimer(timer[playerid]);
	return 1;
}
Reply
#5

Note to DJDhan, ana should be a function

@omidi: somewhere outside any other function
Reply
#6

warning 203: symbol is never used: "ana"
Reply
#7

forward ana(playerid);
?
Reply
#8

You could also use a tick for this then no timers are required, timers bottle neck the sync.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)