搜索
查看: 3657|回复: 1

我有webmod源码,来个高手,修改源码

[复制链接]
发表于 2010-8-25 01:08:35 | 显示全部楼层 |阅读模式 来自 中国–黑龙江–双鸭山
我就纳闷了为什么 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[32]
        new webmodflagscvar[32]

        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[192]
        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[32]
        read_argv(1,name,31)
        new priv = cmd_target(id,name,0)
        if (!priv) return PLUGIN_HANDLED
        new length = strlen(name)+1
        new message[192], name2[32]
        get_user_name(id,name2,31)
        read_args(message,191)
        remove_quotes(message[length])
        get_user_name(priv,name,31)
        if (id&&id!=priv) client_print(id,print_chat,"(WebMod)(Private) %s :   %s",name,message[length])
        client_print(priv,print_chat,"(WebMod)(Private) %s :   %s",name,message[length])
        console_print(id,"(WebMod)(Private) %s :   %s",name,message[length])
        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
}

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
发表于 2013-2-14 12:13:30 | 显示全部楼层 来自 中国–辽宁–鞍山–海城市
学习一下。
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表