Timer for command???
#6

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/command", cmdtext, true, 9) == 0)
  {
    if(GetPVarInt(playerid,"WAITBEFOREUSINGITAGAIN")>GetTickCount())return SendClientMessage(playerid,Colour,"ERROR : You must wait before using a command");
    SetPVarInt(playerid,"WAITBEFOREUSINGITAGAIN",GetTickCount()+5000); // 1000 = 1 secs
    // Put some codes here
  }
  return 1;
}
Same goes to dcmd and zcmd

EDIT : Oh shi... Better look at the time and date next time >.>
Reply


Messages In This Thread
Timer for command??? - by <Weponz> - 25.10.2010, 13:55
Re: Timer for command??? - by BMUK - 25.10.2010, 14:09
Re: Timer for command??? - by <Weponz> - 25.10.2010, 14:27
Re: Timer for command??? - by SampStunta - 25.10.2010, 14:30
Re: Timer for command??? - by sampVaz - 06.11.2010, 03:12
Re: Timer for command??? - by ViruZZzZ_ChiLLL - 06.11.2010, 03:31
Re: Timer for command??? - by <Weponz> - 06.11.2010, 07:54
Re: Timer for command??? - by Mean - 06.11.2010, 08:21

Forum Jump:


Users browsing this thread: 4 Guest(s)