The plugin doesn't count frames correctly anyways, something like this would be better, although it can still result in false positives
.....
Eh, it looks a bit messy..
Lag spikes can cause players to get slayed for no reason since you don't even have warning count, and also because of this fps limit should be somewhere in 110.
I never understood this 'TASKID_DO' thing. Why not just pass the client index as the taskid? There's nothing wrong with that.
Perhaps you should check in x second intervals if client's fps is illegal and have at least 3 warnings.
This will reduce false positives drastically, if not get rid of them completely.
I've written at least a little better version of this feel free to use it..
It has all the features were requested and it logs client warnings into your logs directory.
If you're still getting false positives try increasing amx_max_fps.
You can modify how often (seconds) a client is being checked via amx_fps_check.
public fwKillClient(iPlayer)
{
if( !is_user_connected(iPlayer) || !is_user_alive(iPlayer) ) return;
user_kill(iPlayer);
ColorChat(iPlayer, RED, "^3[AMXX] You were slayed for too high FPS! Write ^4fps_max 100 ^3in your console!");
}
y this is good rohan, but can u remove WARNING messages pelase only slay, and fix slay. it does not slay player. just says.
It does slay on the 4th warning in a row with a 5 second delay as requested. This is to confirm that the player is using high FPS and to avoid false positives. I've removed the warning message.
If you'd like the slay to occur faster you can decrease MAXWARNINGS or amx_fps_check but again this can lead to people getting slayed due to lag.