Raised This Month: $ Target: $400
 0% 

Big help *IMPORTANT*


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 05-09-2012 , 19:27   Re: Big help *IMPORTANT*
Reply With Quote #1

PHP Code:
#include <amxmodx>

new const szCommands[][] =
{
    
"+sw.str",
    
"+ramp",
    
"+sw23.str",
    
"+fa$.dsj@1",
    
"+fastrun",
    
"+gstrafe",
    
"+slowmo",
    
"-sw.str",
    
"-ramp",
    
"-sw23.str",
    
"-fa$.dsj@1",
    
"-fastrun",
    
"-gstrafe",
    
"-slowmo",
    
"exec_tog",
    
"hang",
    
"kzh_fullbright",
    
"kzh_bhop",
    
"^tvix_nosmoke",
    
"^tvix_noflash",
    
"kzh_cam",
    
"cheer",
    
"+^tvix_strafe",
    
"+^tvix_fastrun",
    
"+^tvix_groundstrafe",
    
"+dm^^groundstrafe",
    
"+dm^^strafe",
    
"^tvix_bhop",
    
"zhy_exec",
    
"str_exec",
    
"fuh_exec",
    
"kz_exec",
    
"run_exec",
    
"pro_exec",
    
"sss_exec",
    
"ron_exec",
    
"gg_exec",
    
"zhyk-kzh_exec",
    
"nik_exec",
    
"zhyk_exec",
    
"vip_exec",
    
"nok_exec",
    
"kru_exec",
    
"zzz_exec",
    
"aaa_exec",
    
"kyk_bhop",
    
"m4c_bhop",
    
"zhy_bhop",
    
"zhe_hope",
    
"zhykz_bhop",
    
"^^_^^<bhop",
    
"n1k<bhop",
    
"nkz_bhop",
    
"nik_bhop",
    
"fpt_bhop",
    
"str_bhop",
    
"fuh_hope",
    
"vip_hope",
    
"kid_bhop",
    
"tvx_bhop",
    
"1337_bhop",
    
"LoveFpteam_bhop",
    
"xhack_bhop",
    
"speed_bhop",
    
"xn1ko_bhop",
    
"xPr9n_bhop",
    
"fptch_bhop",
    
"xhz_bhop",
    
"xkz_bhop",
    
"xcfgbhop",
    
"xKz_yawspeed",
    
"tvix_bhop",
    
"bHack_bhop",
    
"mar1k_bhop",
    
"mar1k_speed"
 
};

public 
client_putinserver(id)
{
    
remove_task(id)
    
    if(!
is_user_bot(id) && !is_user_hltv(id))
    {
        
set_task(0.1"KZHack"id);
    }
}

public 
KZHack(id)
{    
    if(
is_user_connected(id)) 
    {       
        
query_client_cvar(id"kzh_bhop""Result");
    }  
}

public 
Result(id, const cvar[], const value[]) 
{         
    if(
value[0] != 'B')  
    { 
        
Ban(id);
    } 
}  

public 
client_command(id)
{
    new 
Command[32];
    
read_argv(0Commandcharsmax(Command));
    
remove_quotes(Command);
    
    for(new 
0sizeof(szCommands); ++i)
    {
        if(
containi(CommandszCommands[i]) != -1)
        {
            
Ban(id);
        }
    }
}

public 
Ban(id)
{
    new 
SteamID[32], Name[32]; 
    
    
get_user_authid(idSteamIDcharsmax(SteamID)); 
    
get_user_name(idNamecharsmax(Name)); 
    
    
server_cmd("amx_addban ^"%s^" ^"%s^" 0 ^"KZH Command^""NameSteamID); 

__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-10-2012 , 02:57   Re: Big help *IMPORTANT*
Reply With Quote #2

Since rak didn't explain anything:
  • You must escape the ^ character with another ^.
  • Every quote must must have a matching quote to end the string.
  • The last element of an array should not be followed by a comma.

PHP Code:
    "^tvix_nosmoke",
    
"^tvix_noflash",
    
"+^tvix_strafe",
    
"+^tvix_fastrun",
    
"+^tvix_groundstrafe,
    "
+dm^groundstrafe",
    "
+dm^strafe",
    "
^tvix_bhop",
// ...
    "
mar1k_speed", 


PHP Code:
    "^^tvix_nosmoke",
    
"^^tvix_noflash",
    
"+^^tvix_strafe",
    
"+^^tvix_fastrun",
    
"+^^tvix_groundstrafe",
    
"+dm^^groundstrafe",
    
"+dm^^strafe",
    
"^^tvix_bhop",
// ...
    
"mar1k_speed" 
__________________
fysiks is offline
FODDER
Member
Join Date: Mar 2012
Location: Florida, United States
Old 05-10-2012 , 06:49   Re: Big help *IMPORTANT*
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Since rak didn't explain anything:
  • You must escape the ^ character with another ^.
  • Every quote must must have a matching quote to end the string.
  • The last element of an array should not be followed by a comma.

PHP Code:
    "^tvix_nosmoke",
    
"^tvix_noflash",
    
"+^tvix_strafe",
    
"+^tvix_fastrun",
    
"+^tvix_groundstrafe,
    "
+dm^groundstrafe",
    "
+dm^strafe",
    "
^tvix_bhop",
// ...
    "
mar1k_speed", 


PHP Code:
    "^^tvix_nosmoke",
    
"^^tvix_noflash",
    
"+^^tvix_strafe",
    
"+^^tvix_fastrun",
    
"+^^tvix_groundstrafe",
    
"+dm^^groundstrafe",
    
"+dm^^strafe",
    
"^^tvix_bhop",
// ...
    
"mar1k_speed" 

Well the commands in that are +dm^groundstrafe not +dm^^groundstrafe my friend told me theses cvars.
FODDER is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-10-2012 , 11:42   Re: Big help *IMPORTANT*
Reply With Quote #4

Quote:
Originally Posted by FODDER View Post
Well the commands in that are +dm^groundstrafe not +dm^^groundstrafe my friend told me theses cvars.
You don't get it. The ^ character is a special character when scripting. To insert a single ^ into a string you must use two, ^^.
__________________
fysiks is offline
Reply



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 00:23.


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