Timer Help
#6

it can be done with a variable.
pawn Код:
//On top of script
new CommandUsed[MAX_PLAYERS];
// command
if(strcmp(...)==0)
{
  if(CommandUsed[playerid] == -1) return SendClientMessage(... /* command was used before, pleae wait this and that */);
  //do command here
  CommandUsed[playerid] = -1;
  SetTimerEx("ResetCmd", 5000 /*5 seconds*/, 0 /* not repeating*/, "i", playerid /* this sets the first parameter of ResetCmd(i) to be playerid);
}

//ResetCmd(i)
{
  CommandUsed[i] = 0;
}
sorry it's messy but if you edit it properly it hsould work. this is just the principle how it should be like
Reply


Messages In This Thread
Timer Help - by FreeSoul - 01.07.2009, 10:25
Re: Timer Help - by Abernethy - 01.07.2009, 10:31
Re: Timer Help - by refshal - 01.07.2009, 10:33
Re: Timer Help - by Djiango - 01.07.2009, 10:36
Re: Timer Help - by FreeSoul - 01.07.2009, 10:47
Re: Timer Help - by Ignas1337 - 01.07.2009, 11:01

Forum Jump:


Users browsing this thread: 1 Guest(s)