/report timer
#1

//alright, thanks
Reply
#2

I should just do this:
When the player logs on: reportallowed = 1
when the player uses the command, the timer starts and reportallowed = 0
when timer finishes: reportallowed = 1
Sorry for the fact that i didn't write the code.
Reply
#3

Don't use a timer for something banal like this; add this at the top in the body of the command:
pawn Код:
static
    lastReport[MAX_PLAYERS]; // note: static! That is very important

if((gettime() - lastReport[playerid]) < 60)
    return SendClientMessage(playerid, COLOR_RED, "Please wait at least 60 seconds.");

lastReport[playerid] = gettime();
Reply
#4

Best option Vince, nice solution .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)