AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Big help *IMPORTANT* (https://forums.alliedmods.net/showthread.php?t=184872)

FODDER 05-09-2012 18:26

Big help *IMPORTANT*
 
This is solved. Look at post #3

wickedd 05-09-2012 19:21

Re: Big help *IMPORTANT*
 
What's so @#$%%^& IMPORTANT?

rak 05-09-2012 19:27

Re: Big help *IMPORTANT*
 
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); 



fysiks 05-10-2012 02:57

Re: Big help *IMPORTANT*
 
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", 

:arrow:

PHP Code:

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


FODDER 05-10-2012 06:49

Re: Big help *IMPORTANT*
 
Quote:

Originally Posted by fysiks (Post 1706044)
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", 

:arrow:

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.

fysiks 05-10-2012 11:42

Re: Big help *IMPORTANT*
 
Quote:

Originally Posted by FODDER (Post 1706107)
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, ^^.

FODDER 05-10-2012 15:15

Re: Big help *IMPORTANT*
 
So lets say someone is using the dm hack. the bind for it is bind "key" "+dm^groundstrafe"

so it won't work since in the thing its +dm^groundstrafe so i should change it to +dm^^groundstrafe

?

rak 05-10-2012 16:30

Re: Big help *IMPORTANT*
 
"+dm^groundstrafe" == "+dm^^groundstrafe"

edit: test this

PHP Code:

#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "[R]ak"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_srvcmd("+dm^^groundstrafe""test")
}

public 
test()
    
console_print(0"call ok"

in server console put +dm^groundstrafe

FODDER 05-10-2012 16:55

Re: Big help *IMPORTANT*
 
Can you make it for all theses

PHP Code:

    "+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" 

Then when the user does this in console it will print in Green colorchat Name has been caught for using KzHack! then it will make a file in configs named kzhackers.cfg or kzhackers.ini and list the Name Steamid Command

Exolent[jNr] 05-10-2012 17:08

Re: Big help *IMPORTANT*
 
Quote:

Originally Posted by FODDER (Post 1706365)
Can you make it for all theses

PHP Code:

    "+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" 

Then when the user does this in console it will print in Green colorchat Name has been caught for using KzHack! then it will make a file in configs named kzhackers.cfg or kzhackers.ini and list the Name Steamid Command

1. Go into notepad.
2. CTRL+H (Or Edit -> Replace)
3. Find what: ^
4. Replace with: ^^
5. Replace All
6. ???
7. Profit


All times are GMT -4. The time now is 05:34.

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