Raised This Month: $ Target: $400
 0% 

Codding help.Function ignored.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Menethil
Senior Member
Join Date: Aug 2011
Old 08-02-2011 , 15:43   Codding help.Function ignored.
Reply With Quote #1

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.
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