ASK CMD
#6

Using timers is a bad idea. It's better using unix timestamp:
pawn Код:
// global
new Cmd_Timer[MAX_PLAYERS];

// OnPlayerConnect:
Cmd_Timer[playerid] = 0;

// in command:
if (Cmd_Timer[playerid] && gettime() < Cmd_Timer[playerid]) return // error message about waiting
// code from the command and in last line:
Cmd_Timer[playerid] = gettime() + 1200;
Reply


Messages In This Thread
ASK CMD - by [IND]Crazy - 01.04.2014, 16:27
Re: ASK CMD - by Sithis - 01.04.2014, 16:30
Re: ASK CMD - by [IND]Crazy - 01.04.2014, 16:32
Re: ASK CMD - by CroM256 - 01.04.2014, 16:36
Re: ASK CMD - by Sithis - 01.04.2014, 16:40
Re: ASK CMD - by Konstantinos - 01.04.2014, 17:15
Re: ASK CMD - by [IND]Crazy - 01.04.2014, 17:30

Forum Jump:


Users browsing this thread: 1 Guest(s)