Animation help!
#6

you could set a 5 or 10 second timer

pawn Код:
new WaitanimationTimer[MAX_PLAYERS]; // top of your script

forward WaitanimmationTimerOff(playerid); // under new WaitanimationTimer[MAX_PLAYERS];

make a new cmd like

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/dance", cmdtext, true, 5) == 0)
{
if(WaitanimationTimer[playerid] == 1)
{
 //some text here - like sendclient message
WaitanimationTimer[playerid] = 1;
SetTimer("WaitanimationTimerOff", 5000, 0); // 5000 is 5 seconds
return 1;
}
return 0;
}

& PUT THIS AT THE BOTTOM OF YOUR SCRIPT

public WaitanimationTimerOff(playerid)
{
if(WaitanimationTimer[playerid] == 1)
{
WaitanimationTimer[playerid] = 0;
return 0;
}
return 1;
}
Reply


Messages In This Thread
Animation help! - by danish007 - 10.02.2015, 16:54
Re: Animation help! - by Sime30 - 10.02.2015, 17:07
Re: Animation help! - by CalvinC - 10.02.2015, 17:10
Re: Animation help! - by danish007 - 11.02.2015, 08:26
Re: Animation help! - by CalvinC - 11.02.2015, 08:32
Re: Animation help! - by andrewgrob - 11.02.2015, 09:04
Re: Animation help! - by danish007 - 11.02.2015, 09:17
Re: Animation help! - by CalvinC - 11.02.2015, 09:45
Re: Animation help! - by danish007 - 11.02.2015, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)