saving timer
#7

Why don't do it like this?

Код:
CMD:rob(playerid, params[])
{
      Temp[playerid] = gettime();
      if(gettime() - Temp[playerid] < 300) 
      {
      // do things here
      }else return SendClientMessage(playerid, -1, "Please wait before doing this again");
}
300 will set it to 300 seconds. The player cant use the command for the next 5 minutes

Edit:
You can save it like this:
Код:
INI_WriteInt(File,"RobTime",Temp[playerid]);
But i doubt that will actually be useful, unless you make it save every second.
It will be useful against re-logging to restore the timer.
Reply


Messages In This Thread
saving timer - by astanalol - 22.03.2017, 22:51
Re: saving timer - by astanalol - 23.03.2017, 09:35
Re: saving timer - by Runn3R - 23.03.2017, 17:48
Re: saving timer - by astanalol - 24.03.2017, 00:23
Re: saving timer - by Toroi - 24.03.2017, 01:14
Re: saving timer - by astanalol - 24.03.2017, 03:59
Re: saving timer - by jasperschellekens - 24.03.2017, 05:58
Re: saving timer - by ATGOggy - 24.03.2017, 06:10
Re: saving timer - by astanalol - 24.03.2017, 11:06
Re: saving timer - by jasperschellekens - 24.03.2017, 14:35

Forum Jump:


Users browsing this thread: 1 Guest(s)