#1

How to put a command on a timer so you can only do it every hour?
Reply
#2

Using an array and SetTimerEx function.
pawn Code:
//on top
new CommandUsed[MAX_PLAYERS];
forward CommandDelay(playerid);

//On command...
CommandUsed[playerid] = 1;
SetTimerEx("CommandDelay",3600000, false, "i", playerid);
if(CommandUsed[playerid] == 1) reuturn //SendClient...

//somewhere else
public CommandDelay(playerid)
{
CommandUsed[playerid] = 0;
return 1;
}
Reply
#3

so could i use this as a welfare check?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)