CS脚本检测
复制下面的所有东西,粘贴到一个txt文件里,然后将扩展名改为sma,然后利用cs插件里的scripting文件里的compile.exe将文件改成amxx然后安装一个amxx就能用了,你要复制的是:
/* AMX Mod script.
*
* (c) Copyright 2002, OLO
* This file is provided as is (no warranties).
*
*/
/* cmds:
* amx_cc_check < cvar | alias >
* checks if cvar or alias exists
* (f.e.: amx_cc_check xxxaimbot)
*
* amx_fc_cfg < cfg >
* forces configuration
* (f.e.: amx_fc_cfg cl_forwardspeed 400)
*
* You may keep configuration in server.cfg
* or in addons/amx/cfgchk.cfg
*/
#include <amxmod>
#define MAX_FORCES 192
#define MAX_CHECKS 24
#define CHECK_NEXT 763734
#define FORCE_NEXT 235334
#define CHECK_TIMEOUT 154675
#define FORCE_TIMEOUT 843522
new CHECK_CLOSE[8] = {"amxcc"}
new FORCE_CLOSE[8] = {"amxcf"}
new cfg_check[MAX_CHECKS][32]
new cfg_num = 0
new cfg_force[MAX_FORCES][32]
new cfg_vforce[MAX_FORCES][32]
new cfg_force_num = 0
new success_cc[33]
new success_cf[33]
new close_code_cc[33][6]
new close_code_cf[33][6]
new position_cc[33]
new position_cf[33]
do_checking(id,pos){
new param[3]
param[0] = id
position_cc[id] = pos
set_task(0.5,"fchecking",CHECK_NEXT+id,param,2)
}
do_forcing(id,pos){
new param[3]
param[0] = id
position_cf[id] = pos
set_task(0.3,"fforcing",FORCE_NEXT+id,param,2)
}
public fchecking(param[]){
new id = param[0]
success_cc[id] = 0
format(close_code_cc[id],4,"%c%c%c",random_num('a','z'),random_num('a','z'),random_num('a','z'))
client_cmd(id,"%s;%s %s",cfg_check[position_cc[id]],CHECK_CLOSE,close_code_cc[id])
set_task(10.0,"time_out",CHECK_TIMEOUT+id,param,2)
}
public fforcing(param[]){
new id = param[0]
new posid = position_cf[id]
success_cf[id] = 0
format(close_code_cf[id],4,"%c%c%c",random_num('a','z'),random_num('a','z'),random_num('a','z'))
client_cmd(id,"%s %s;%s %s",cfg_force[posid],cfg_vforce[posid],FORCE_CLOSE,close_code_cf[id])
client_cmd(id,"alias %s ^"echo [AMX] %s is %s^"",cfg_force[posid],cfg_force[posid],cfg_vforce[posid])
set_task(10.0,"time_out",FORCE_TIMEOUT+id,param,2)
}
public client_command(id){
if (!success_cc[id]){
new arg[16]
read_argv(0,arg,15)
if (equal(arg,cfg_check[position_cc[id]])){
success_cc[id] = 1
remove_task(CHECK_TIMEOUT+id)
return PLUGIN_HANDLED
}
}
else if (!success_cf[id]){
new arg[16]
read_argv(0,arg,15)
if (equal(arg,cfg_vforce[position_cf[id]])){
success_cf[id] = 1
remove_task(FORCE_TIMEOUT+id)
return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
}
public client_putinserver(id){
cleanup_action(id)
if (!is_user_bot(id)){
if (cfg_num) do_checking(id,0)
if (cfg_force_num) do_forcing(id,0)
}
return PLUGIN_CONTINUE
}
public client_disconnect(id){
cleanup_action(id)
return PLUGIN_CONTINUE
}
public gate_cc(id){
if (success_cc[id]==2)
return PLUGIN_HANDLED
new arg[4]
read_argv(1,arg,3)
if (equal(arg,close_code_cc[id])){
if (!success_cc[id])
say_found(id,cfg_check[position_cc[id]])
else if (++position_cc[id] < cfg_num)
do_checking(id,position_cc[id])
else
say_finished(id,"checking")
}
else
say_is_blocking(id)
remove_task(CHECK_TIMEOUT+id)
return PLUGIN_HANDLED
}
public gate_cf(id){
if (success_cf[id]==2)
return PLUGIN_HANDLED
new arg[4]
read_argv(1,arg,3)
if (equal(arg,close_code_cf[id])){
if (success_cf[id])
say_is_blocking(id)
else if (++position_cf[id] < cfg_force_num)
do_forcing(id,position_cf[id])
else
say_finished(id,"forcing")
}
else
say_is_blocking(id)
remove_task(FORCE_TIMEOUT+id)
return PLUGIN_HANDLED
}
public time_out(param[])
say_is_blocking(param[0])
say_is_blocking(id){
new name[32]
get_user_name(id,name,31)
server_cmd("say ^"Player %s is blocking Cfg Checker^"",name)
server_cmd("say ^"Stoped forcing and checking configuration on player %s^"",name)
cleanup_action(id)
}
say_finished(id,action[]){
new name[32]
get_user_name(id,name,31)
server_cmd("say ^"Finished configuration %s on %s^"",action,name)
cleanup_action(id)
}
say_found(id,param[]){
new name[32]
get_user_name(id,name,31)
server_cmd("say ^"Found %s on player %s^"",param,name)
server_cmd("say ^"Stoped forcing and checking configuration on player %s^"",name)
cleanup_action(id)
}
cleanup_action(id){
success_cf[id] = 2
success_cc[id] = 2
position_cc[id] = cfg_num
position_cf[id] = cfg_force_num
remove_task(CHECK_NEXT+id)
remove_task(FORCE_NEXT+id)
remove_task(CHECK_TIMEOUT+id)
remove_task(FORCE_TIMEOUT+id)
}
public set_cc(){
if (cfg_num < MAX_CHECKS){
new arg[32]
read_argv(1,arg,31)
copy(cfg_check[cfg_num],31,arg)
cfg_num++
}
return PLUGIN_HANDLED
}
public set_fc(){
if (cfg_force_num < MAX_FORCES){
new arg[32]
read_argv(1,arg,31)
copy(cfg_force[cfg_force_num],31,arg)
read_argv(2,arg,31)
copy(cfg_vforce[cfg_force_num],31,arg)
cfg_force_num++
}
return PLUGIN_HANDLED
}
public plugin_init(){
register_plugin("Cfg Checker","0.7.4","default")
register_clcmd(CHECK_CLOSE,"gate_cc")
register_clcmd(FORCE_CLOSE,"gate_cf")
register_srvcmd("amx_cc_check","set_cc")
register_srvcmd("amx_fc_cfg","set_fc")
server_cmd("exec addons/amx/cfgchk.cfg")
return PLUGIN_CONTINUE
}