[HELP] How can i add a timer in this command?
#2

( Btw use [.pawn] [/pawn] )
I took this from one cops'n'robbers
Top of script where are all the new's at.
pawn Код:
new RobbedPlyRecent[MAX_PLAYERS];
OnGameModeInIt.
pawn Код:
SetTimer("RobbedPlayerRecent",60000,1);
Now go somewhere in script and do this :
pawn Код:
forward RobbedPlayerRecent();
public RobbedPlayerRecent()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
    {
   if(RobbedPlyRecent[i] == 1)
     {
    RobbedPlyRecent[i] =0;

  }
 }
}
OnPlayerConnect..
pawn Код:
RobbedPlyRecent[playerid] =0;
OnPlayerSpawn..
pawn Код:
RobbedPlyRecent[playerid] =1;
now add this to your command
pawn Код:
if(RobbedPlyRecent[playerid] == 1) {
  SendClientMessage(playerid,COLOR_ERROR,"Command used recently... Please wait");
  return 1;
  }
Yes i know its newbish but hope it works.
Reply


Messages In This Thread
[HELP] How can i add a timer in this command? - by akis_tze - 05.12.2009, 11:49
Re: [HELP] How can i add a timer in this command? - by DaHP14Y3R - 06.04.2010, 16:14
Re: [HELP] How can i add a timer in this command? - by Hiddos - 06.04.2010, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)