Thread: 200 fps = kick
View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 10-04-2020 , 22:49   Re: 200 fps = kick
Reply With Quote #3

Quote:
Originally Posted by Stefanos View Post
if plugin detects that player in one moment have more than 200 fps, he immediately got kicked with reason "Do not use more fps than 100(fps_max 100)"
Spoiler


Code:
#include amxmodx new iFps_kick; public plugin_init() {     register_plugin("FPS kick", "1.0", "SPiNX");     iFps_kick = register_cvar("fps_kick","200") } public client_command(id) {     if(is_user_connected(id) && !is_user_bot(id) )         query_client_cvar(id, "fps_max", "cvar_result_func"); } public cvar_result_func(id, const cvar[], const value[]) {     if(equali(cvar,"fps_max") && str_to_num(value) > get_pcvar_num(iFps_kick) || !is_str_num(value) )         server_cmd("kick #%d Your %s is %i. Do not use over %i", get_user_userid(id), cvar, str_to_num(value), get_pcvar_num(iFps_kick)); }
__________________

Last edited by DJEarthQuake; 04-25-2023 at 11:12. Reason: updated
DJEarthQuake is offline