Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <fakemeta>
- #include <engine>
- #include <colorchat>
- #define PLUGIN "Anti KzH"
- #define VERSION "1.0"
- #define AUTHOR "anderseN"
- new bhopg[33],bhopf[33],in_check[33],checked[33],type[33][128]
- new LOG[ 200 ];
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_cvar( "nsc_kz_punish", "2" );
- register_cvar( "nsc_kz_btime", "0" );
- register_cvar( "nsc_kz_bhop", "0" );
- register_cvar( "nsc_kz_log", "1" );
- register_forward(FM_PlayerPreThink, "Forward")
- set_task(50.0, "reset",0,"",0,"b")
- }
- public reset()
- {
- new p[32],num
- get_players(p,num)
- for(new i=0;i<num;i++)
- {
- if (!is_user_connected(p[i]) && !is_user_alive(p[i]) && !in_check[p[i]])
- continue
- bhopg[p[i]] = 0
- bhopf[p[i]] = 0
- checked[p[i]] = false
- }
- }
- public Forward(id)
- {
- if(is_user_alive(id) && get_cvar_num("nsc_kz_bhop") > 0 && pev(id,pev_button) & IN_JUMP)
- {
- if(pev(id,pev_flags) & FL_ONGROUND)
- {
- bhopg[id]++
- switch(get_cvar_num("nsc_kz_bhop")){
- case 1: if(bhopg[id] > 8 && bhopf[id] == 0){
- in_check[id] = true
- }
- case 2: if(bhopg[id] > 15 && bhopf[id] == 0){
- in_check[id] = true
- }
- }
- }
- else
- {
- bhopf[id]++
- }
- }
- if(pev(id,pev_flags) & FL_ONGROUND && in_check[id] && !checked[id])
- {
- client_cmd(id, "+jump;wait;wait;+jump;wait;wait;+jump;wait;wait;+jump;wait;wait;+jump")
- set_task( 0.6, "check", id)
- checked[id] = true
- }
- }
- public check(id)
- {
- if(bhopf[id] == 0){
- type[id] = "Auto Bhop"
- wywal(id)
- }
- else
- {
- client_cmd(id, "-jump")
- in_check[id] = false
- }
- }
- public plugin_cfg()
- {
- static sciezka[64];
- get_localinfo("amxx_datadir", sciezka, 63);
- formatex(LOG, 199, "%s/KzHackers.txt", sciezka);
- }
- public client_putinserver( id )
- {
- remove_task( id );
- new sid[32]
- get_user_authid(id, sid, 31)
- if (equali(sid, "STEAM_ID_PENDING") ||
- equali(sid, "STEAM_ID_LAN") ||
- equali(sid, "HLTV") ||
- equali(sid, "4294967295") ||
- equali(sid, "VALVE_ID_LAN") ||
- equali(sid, "VALVE_ID_PENDING"))
- {
- client_print(id,print_console,"AntiKZH - Clean!")
- }
- else
- {
- set_task( 0.5, "test", id );
- }
- bhopg[id] = 0
- bhopf[id] = 0
- in_check[id] = false
- checked[id] = false
- }
- public client_disconnect(id)
- {
- bhopf[id] = 0
- bhopg[id] = 0
- in_check[id] = false
- checked[id] = false
- }
- public test( id ) {
- if( is_user_connected( id ) )
- {
- query_client_cvar( id, "kzh_bhop", "kzh" );
- set_task( 0.5, "test2", id );
- }
- }
- public test2( id ) {
- if( is_user_connected( id ) )
- {
- query_client_cvar( id, "kyk_bhop", "kyk" );
- set_task( 0.5, "test3", id );
- }
- }
- public test3( id ) {
- if( is_user_connected( id ) )
- {
- query_client_cvar( id, "001_bhop", "trawka" );
- query_client_cvar( id, "002_bhop", "trawka" );
- query_client_cvar( id, "Trk_bhop", "trawka" );
- query_client_cvar( id, "m3c_bhop", "trawka" );
- query_client_cvar( id, "m4c_bhop", "trawka" );
- set_task( 0.5, "test4", id );
- }
- }
- public test4( id ) {
- if( is_user_connected( id ) )
- {
- query_client_cvar( id, "zhy_bhop", "zhyk" );
- query_client_cvar( id, "zhe_bhop", "zhyk" );
- set_task( 0.5, "test5", id );
- }
- }
- public test5( id ) {
- if( is_user_connected( id ) )
- {
- query_client_cvar( id, "^^_^^<bhop", "n1kzh" );
- query_client_cvar( id, "n1k<bhop", "n1kzh" );
- query_client_cvar( id, "nkz_bhop", "n1kzh" );
- query_client_cvar( id, "nik_bhop", "n1kzh" );
- set_task( 0.5, "test6", id );
- }
- }
- public test6( id ) {
- if( is_user_connected( id ) )
- {
- query_client_cvar( id, "fpt_bhop", "kzcustom" );
- query_client_cvar( id, "str_bhop", "kzcustom" );
- query_client_cvar( id, "fuh_bhop", "kzcustom" );
- query_client_cvar( id, "vip_bhop", "kzcustom" );
- query_client_cvar( id, "p7x_bhop", "kzcustom" );
- query_client_cvar( id, "p7x_xtd", "kzcustom" );
- query_client_cvar( id, "p7x_loopx", "kzcustom" );
- query_client_cvar( id, "p7x_bunny", "kzcustom" );
- query_client_cvar( id, "p7x_left", "kzcustom" );
- query_client_cvar( id, "p7x_exec", "kzcustom" );
- set_task( 0.5, "test7", id );
- }
- }
- public test7( id ) {
- if( is_user_connected( id ) )
- {
- query_client_cvar( id, "xhack_bhop", "xhack" );
- query_client_cvar( id, "xhz_bhop", "xhack" );
- query_client_cvar( id, "xkz_bhop", "xhack" );
- }
- }
- public kzh( id, const cvar[ ], const value[ ] ) {
- if( value[0] != 'B' ) {
- type[id] = "KZHack"
- wywal( id )
- }
- return PLUGIN_HANDLED;
- }
- public kyk( id, const cvar[ ], const value[ ] ) {
- if( value[0] != 'B' ) {
- type[id] = "KykHack"
- wywal( id )
- }
- return PLUGIN_HANDLED;
- }
- public trawka( id, const cvar[ ], const value[ ] ) {
- if( value[0] != 'B' ) {
- type[id] = "TrawkaHack"
- wywal( id )
- }
- return PLUGIN_HANDLED;
- }
- public zhyk( id, const cvar[ ], const value[ ] ) {
- if( value[0] != 'B' ) {
- type[id] = "ZhykHack"
- wywal( id )
- }
- return PLUGIN_HANDLED;
- }
- public n1kzh( id, const cvar[ ], const value[ ] ) {
- if( value[0] != 'B' ) {
- type[id] = "N1kZHack"
- wywal( id )
- }
- return PLUGIN_HANDLED;
- }
- public kzcustom( id, const cvar[ ], const value[ ] ) {
- if( value[0] != 'B' ) {
- type[id] = "KZHack."
- wywal( id )
- }
- return PLUGIN_HANDLED;
- }
- public xhack( id, const cvar[ ], const value[ ] ) {
- if( value[0] != 'B' ) {
- type[id] = "xHack"
- wywal( id )
- }
- return PLUGIN_HANDLED;
- }
- public wywal( id )
- {
- if(is_user_connected(id))
- {
- static LogFile[ 64 ];
- static Data[ 128 ];
- static Name[32], authid[32], ip[32], uid;
- get_user_name(id, Name, sizeof Name - 1);
- get_user_authid(id,authid,sizeof authid - 1);
- get_user_ip(id,ip,sizeof ip - 1);
- uid = get_user_userid(id);
- ColorChat( 0, BLUE, " %s is using KzHack!!!", Name );
- switch(get_cvar_num( "nsc_kz_punish"))
- {
- case 0 :
- {
- if ( get_cvar_num( "nsc_kz_log") > 0 )
- {
- get_localinfo( "amxx_datadir" , LogFile , 63 );
- format( LogFile , 63 , "/%s/KzHackers.txt" , LogFile );
- }
- log_amx( "Name: ^"%s^" STEAMID: ^"%s^" IP: ^"%s^" Reason: ^"%s^"" , Name , authid, ip, type[id] );
- formatex( Data , 127 , "Name: ^"%s^" STEAMID: ^"%s^" IP: ^"%s^" Reason: ^"%s^"" , Name , authid, ip, type[id] );
- write_file( LogFile , Data );
- }
- case 1 :
- {
- if ( get_cvar_num( "nsc_kz_log") > 0 )
- {
- get_localinfo( "amxx_datadir" , LogFile , 63 );
- format( LogFile , 63 , "/%s/KzHackers.txt" , LogFile );
- }
- log_amx( "Name: ^"%s^" STEAMID: ^"%s^" IP: ^"%s^" Reason: ^"%s^"" , Name , authid, ip, type[id] );
- formatex( Data , 127 , "Name: ^"%s^" STEAMID: ^"%s^" IP: ^"%s^" Reason: ^"%s^"" , Name , authid, ip, type[id] );
- write_file( LogFile , Data );
- server_cmd( "kick #%d ^"%s Detected^"", get_user_userid( id ), type[id]);
- }
- case 2 :
- {
- if ( get_cvar_num( "nsc_kz_log") > 0 )
- {
- get_localinfo( "amxx_datadir" , LogFile , 63 );
- format( LogFile , 63 , "/%s/KzHackers.txt" , LogFile );
- }
- log_amx( "Name: ^"%s^" STEAMID: ^"%s^" IP: ^"%s^" Reason: ^"%s^"" , Name , authid, ip, type[id] );
- formatex( Data , 127 , "Name: ^"%s^" STEAMID: ^"%s^" IP: ^"%s^" Reason: ^"%s^"" , Name , authid, ip, type[id] );
- write_file( LogFile , Data );
- server_cmd("amx_ban %d #%d ^"%s Detected. Please unload your cheat in order to join our server^"",get_cvar_num( "nsc_kz_btime"), uid, type[id]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement