SA-MP Forums Archive
Adding Timer In Command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Adding Timer In Command (/showthread.php?tid=193383)



Adding Timer In Command - scripter1 - 25.11.2010

How can I add a timer into a command? I want the command to work for 5 minutes, and then the command should disable itself for 30 minutes. So, how can this be created?

Also, is there anyway I can limit the speed of a vehicle? Meaning, if I'm going 60, the car shouldn't gain any more speed.


Re: Adding Timer In Command - scripter1 - 27.11.2010

Anyone know how to do this?


Re: Adding Timer In Command - zSuYaNw - 27.11.2010

Hi,
you to usse 'SetTimers' == 'LAG'

You Use
pawn Код:
//UP
new bool:BlockCommand[You_Slots];

// OnPlayerCommandText
if(BlockCommand[playerid] == true && strcmp(cmdtext,"/unblock", true)) return SendClientMessage(playerid,COLOR_IR_HERE,"[INFO] COMMANDS BLOCKED, Use /unbloc to Unblock Commands.");

if(!strcmp(cmdtext,"/unblock", true))
{
     BlockCommand[playerid] = false;// Unblock Command
     return 1;
}
if(!strcmp(cmdtext,"/x1", true)) // This is exemple.
{
     BlockCommand[playerid] = true;// Blocking command
     return 1;
}