05.07.2017, 13:47
Quote:
pawn Код:
Since crashdetect fails to report (assuming you already have the latest version, if not; update), debug it manually - more print lines. |
Код HTML:
AntiFlood_Check( playerid, bool:inc=true )
{
AntiFlood_Data[playerid][floodRate] += inc ? RATE_INC : 0;
AntiFlood_Data[playerid][floodRate] = AntiFlood_Data[playerid][floodRate] - ( GetTickCount() - AntiFlood_Data[playerid][lastCheck] );
AntiFlood_Data[playerid][lastCheck] = GetTickCount();
AntiFlood_Data[playerid][floodRate] = AntiFlood_Data[playerid][floodRate] < 0 ? 0 : AntiFlood_Data[playerid][floodRate];
if ( AntiFlood_Data[playerid][floodRate] >= RATE_MAX )
{
#if THRESOLD_ACTION == 1
SendClientMessage(playerid,COLOR_LIGHTRED,"Kick: You got kicked because you did spam.");
Kick(playerid);
#elseif THRESOLD_ACTION == 2
SendClientMessage(playerid,COLOR_LIGHTRED,"Kick: You got kicked because you did spam.");
Kick(playerid);
#else
SendClientMessage(playerid, COLOR_LIGHTRED, "Please stop spam." );
#endif
return false;
}
return true;
}
Thanks