Ok now its look like this, and i got the error the function scan is undefinited.
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", id + TASK_CHECK, _, _, "a", 2)
}
}
public scan(id)
{
id -= 912651
new name[32];
get_user_name(id,name,31);
if(is_user_alive(id))
{
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))
{
user_kill(id)
}
client_print(0,print_chat,"[Developer] %s slayed for playing with %i FPS",name,CurFps[id]);
}
}