Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#define PLUGIN "Anti Developer"
#define VERSION "1.0"
#define AUTHOR "NeuTroN & TCO"
#define TASK_CHECK 912651
new FramesPer[33], CurFps[33], Fps[33];
new cvar_Fps;
new Float:GameTime[33];
public plugin_init()
{
register_plugin("PLUGIN", "VERSION","AUTHOR");
cvar_Fps = register_cvar("amx_developer_fps_max","120");
register_forward(FM_PlayerPreThink,"fwdPlayerPreThink");
}
public fwdPlayerPreThink(id)
{
if(is_user_alive(id))
{
GameTime[id] = get_gametime();
if(FramesPer[id] >= GameTime[id])
Fps[id] += 1;
else
{
FramesPer[id] +=1;
CurFps[id] = Fps[id];
Fps[id] = 0;
}
if(CurFps[id] > get_pcvar_num(cvar_Fps))
{
new name[32],steamid[32];
get_user_name(id,name,31);
client_print(0,print_chat,"[Developer] %s<%s> detected with FPS higher then allowd.Scaning started",name,steamid,CurFps[id]);
set_task(5.0, "scan", TASK_CHECK, _, _, "a", 2)
user_kill(id)
client_print(0,print_chat,"[Developer] %s<%s> slayed for playing with %i FPS",name,steamid,CurFps[id]);
}
}
}
public scan(id)
{
id -= 912651
new name[32],steamid[32];
get_user_name(id,name,31);
get_user_authid(id,steamid,31);
if(is_user_alive(id))
{
GameTime[id] = get_gametime();
if(FramesPer[id] >= GameTime[id])
Fps[id] += 1;
else
{
FramesPer[id] +=1;
CurFps[id] = Fps[id];
Fps[id] = 0;
}
if(CurFps[id] > get_pcvar_num(cvar_Fps))
{
client_print(0,print_chat,"%s - Scan Status: %d FPS", name, CurFps[id])
}
if(CurFps[id] < get_pcvar_num(cvar_Fps))
{
client_print(0,print_chat,"%s - Fps normal status: lower then 101 ", name)
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
This is not working quite good.
No compilling errors.
But i feel that task is not readed .. no client_prints printed on chat from the "scan" function.
And also i want if anyone is kind and sweet to implement a function that slay the player when fps > then the cvar not just slay after the task .. there is no point.
If there is no way to make this task run 3 times ... that means to scan the player for fps 3 times and slay after all 3 scans found fps > the the cvar
Make it just once...
If there is anyone can help me to clean this kz / hns cheaters PM. I have a private plugin with an similar function.. to complex for me.