10.02.2013, 22:30
pawn Код:
forward CheckSpeed(playerid);
public CheckSpeed(playerid)
{
new vehicleid = GetPlayerVehicleID(playerid);
new speed = GetPlayerSpeed(playerid);
if(speed >= 365)
{
new message[256];
format(message, sizeof(message), "[Speed Hack] %s", PlayerName(playerid));
SendMessageToAllAdmins(message,0xFF0000AA);
}
return 1;
}
With a timer on the callback "OnPlayerConnect"
pawn Код:
SetTimerEx("CheckSpeed", 500, true, "i", playerid);
Long story short, when a player goes for more than 365 it sends a SPAM message every 500ms. How can I stop this and possibly alert the admins once every 10 minutes?