SA-MP Forums Archive
Command Timer - 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)
+--- Thread: Command Timer (/showthread.php?tid=434010)



Command Timer - c0smiNN - 30.04.2013

How can I make a 24Hour timer for a command. I want something like this:
If player quit the game and enter again after 24Hour , he can use the command.
Sorry for bad english.


Re: Command Timer - Red_Dragon. - 30.04.2013

You may use a variable for time like this one
pawn Код:
if(PlayerInfo[playerid][pTimeStayed] > 0)
            {
                SendClientMessageEx(playerid, COLOR_GRAD2, "You must play at least 24 hours to be able to BLAH BLAH BLAH");
                return 1;
            }
by using the enum playerinfo and the variable TimeStayed
N.B This is only an example !