我有webmod源码,来个高手,修改源码
我就纳闷了为什么 webmod_adminpass "密码"这个命令就不好用呢?无论怎么办 都只能用OP密码来登录 webmod不能用 自己设定的 webmod密码来登录
请高手来解决一下~~
以下源码
/* AMX Mod X script
*
* (C) Copyright 2008, BoBRoCK + Ser_UFL
* 蒡铗 羿殡 疣耧痤耱疣?弪? "赅?羼螯" 徨?赅觇?腓犷 汔疣眚栝 栩?栩?.
*
* 相痤朦 镱 箪铍鬣龛? "password"
* 埋蜞忤螯 耠邃簋?耱痤麝??server.cfg 潆 桤戾礤龛 镟痤? 噤扈龛耱疣蝾疣
* webmod_adminpass "password"
*/
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "WebMod Admin Password"
#define VERSION "0.4"
#define AUTHOR "BoBRoCK+Co"
public client_connect(id)
{
new webmodflags
new webmodflagsstring
new webmodflagscvar
webmodflags = get_user_flags(id)
get_flags(webmodflags,webmodflagsstring,31)
format(webmodflagscvar,18,"amx_userflags%d",id)
set_cvar_string(webmodflagscvar, webmodflagsstring)
return PLUGIN_CONTINUE
}
public client_infochanged(id)
{
client_connect(id)
return PLUGIN_CONTINUE
}
public admin_publicsay(id,level,cid){
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new message
read_args(message,191)
remove_quotes(message)
client_print(0,print_chat,"(WebMod) : %s",message)
console_print(id,"(WebMod) : %s",message)
return PLUGIN_HANDLED
}
public admin_privatesay(id,level,cid){
if (!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new name
read_argv(1,name,31)
new priv = cmd_target(id,name,0)
if (!priv) return PLUGIN_HANDLED
new length = strlen(name)+1
new message, name2
get_user_name(id,name2,31)
read_args(message,191)
remove_quotes(message)
get_user_name(priv,name,31)
if (id&&id!=priv) client_print(id,print_chat,"(WebMod)(Private) %s : %s",name,message)
client_print(priv,print_chat,"(WebMod)(Private) %s : %s",name,message)
console_print(id,"(WebMod)(Private) %s : %s",name,message)
return PLUGIN_HANDLED
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_srvcmd("webmod_publicsay","admin_publicsay")
register_srvcmd("webmod_privatesay","admin_privatesay")
register_cvar("webmod_adminpass","password")
register_cvar("w_version","0.48 (Unofficial)")
register_cvar("w_theme","1")
register_cvar("w_reallite_version","Reallite Edition 1.0")
register_cvar("amx_userflags1","",FCVAR_SPONLY)
register_cvar("amx_userflags2","",FCVAR_SPONLY)
register_cvar("amx_userflags3","",FCVAR_SPONLY)
register_cvar("amx_userflags4","",FCVAR_SPONLY)
register_cvar("amx_userflags5","",FCVAR_SPONLY)
register_cvar("amx_userflags6","",FCVAR_SPONLY)
register_cvar("amx_userflags7","",FCVAR_SPONLY)
register_cvar("amx_userflags8","",FCVAR_SPONLY)
register_cvar("amx_userflags9","",FCVAR_SPONLY)
register_cvar("amx_userflags10","",FCVAR_SPONLY)
register_cvar("amx_userflags11","",FCVAR_SPONLY)
register_cvar("amx_userflags12","",FCVAR_SPONLY)
register_cvar("amx_userflags13","",FCVAR_SPONLY)
register_cvar("amx_userflags14","",FCVAR_SPONLY)
register_cvar("amx_userflags15","",FCVAR_SPONLY)
register_cvar("amx_userflags16","",FCVAR_SPONLY)
register_cvar("amx_userflags17","",FCVAR_SPONLY)
register_cvar("amx_userflags18","",FCVAR_SPONLY)
register_cvar("amx_userflags19","",FCVAR_SPONLY)
register_cvar("amx_userflags20","",FCVAR_SPONLY)
register_cvar("amx_userflags21","",FCVAR_SPONLY)
register_cvar("amx_userflags22","",FCVAR_SPONLY)
register_cvar("amx_userflags23","",FCVAR_SPONLY)
register_cvar("amx_userflags24","",FCVAR_SPONLY)
register_cvar("amx_userflags25","",FCVAR_SPONLY)
register_cvar("amx_userflags26","",FCVAR_SPONLY)
register_cvar("amx_userflags27","",FCVAR_SPONLY)
register_cvar("amx_userflags28","",FCVAR_SPONLY)
register_cvar("amx_userflags29","",FCVAR_SPONLY)
register_cvar("amx_userflags30","",FCVAR_SPONLY)
register_cvar("amx_userflags31","",FCVAR_SPONLY)
register_cvar("amx_userflags32","",FCVAR_SPONLY)
return PLUGIN_CONTINUE
} 学习一下。
页:
[1]