Raised This Month: $ Target: $400
 0% 

Codding help.Function ignored.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Menethil
Senior Member
Join Date: Aug 2011
Old 08-03-2011 , 02:52   Re: Codding help.Function ignored.
Reply With Quote #3

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]);            
    }       
}
Menethil is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode