16.09.2009, 21:09
You don't need a timer to do this guys:
That will run only when they actually send a text and not every ** amount of seconds like a timer would.
Timers slow your sync, always best to use a work around when possible (well most cases).
pawn Код:
//global
new
gLastTime[ MAX_PLAYERS ] = 0;
//connect and disconnect
gLastTime[ playerid ] = 0;
//text or command or pm, wherever you want
if ( ( gettime() - gLastTime[ playerid ] ) < SOME_AMOUNT_OF_SECONDS )
{
//they are spamming so tell them or return false ?
}
else gLastTime[ playerid ] = gettime();
Timers slow your sync, always best to use a work around when possible (well most cases).

