11.10.2015, 12:45
Okey, thank you...
Is this true?
Edit:
This not working good.
Why? - gettime is always > 1, and antispam is 0, we will use for ex, gettime() = 1000,
if(gettime() < AntiSpam[playerid]) >>> 1000 < 0, it will automatically go to else {
//here to send him to he is spaming
}
And player will be warned just for 1 command, but if we change this: if(gettime() > AntiSpam[playerid])
it will do this, AntiSpam[playerid] = gettime() + 4;
but if player enter 1 command more in next 3 seconds, he will get warn, and i don't want it, i want to player get warn at 3rd command, and at 5. to get kick...
Anyone else to help me?
Quote:
when 300 players enter any command, automatically will be activated 300 Timers, and that timers will slow server too much |
Edit:
Код:
if(gettime() < AntiSpam[playerid]) { AntiSpam[playerid] = gettime() + 4; } else { //here to send him to he is spaming }
Why? - gettime is always > 1, and antispam is 0, we will use for ex, gettime() = 1000,
if(gettime() < AntiSpam[playerid]) >>> 1000 < 0, it will automatically go to else {
//here to send him to he is spaming
}
And player will be warned just for 1 command, but if we change this: if(gettime() > AntiSpam[playerid])
it will do this, AntiSpam[playerid] = gettime() + 4;
but if player enter 1 command more in next 3 seconds, he will get warn, and i don't want it, i want to player get warn at 3rd command, and at 5. to get kick...
Anyone else to help me?