Quote:
Originally Posted by Artifact
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Pass-Nopass"
#define AUTHOR "dark"
#define VERSION "1.5"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say", "HookSay")
register_clcmd("say !nopass", "nopassword", ADMIN_ALL)
}
public HookSay(id)
{
static message[64]
read_args (message, 63)
remove_quotes (message)
if( (message[0] == '!' || message[0] == '/' || message[0] == '.')
&& message[1] == 'p' && message[2] == 'a' && message[3] == 's' && message[4] == 's' )
{
static pass[31];
strbreak(message, message, 6, pass, 30);
remove_quotes(pass);
{
if(!is_user_admin(id)) return PLUGIN_HANDLED;
client_cmd(id, "amx_rcon sv_password %s", pass)
}
client_print(0, print_chat, "(text) Password set to %s", pass)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
public nopassword(id. level, cid)
{
if( !cmd_access(id, level, cid, 2) ) return PLUGIN_HANDLED;
new name[32]
get_user_info(id, "name", name, 31)
client_cmd(id, "amx_rcon sv_password ^"^"")
client_print(0, print_chat, "(text) Password has been deleted by %s", name)
}
|
/tmp/textclp4Zm.sma(29) : warning 217: loose indentation
/tmp/textclp4Zm.sma(3
: warning 217: loose indentation
/tmp/textclp4Zm.sma(41) : error 001: expected token: ")", but found "."
/tmp/textclp4Zm.sma(41) : error 029: invalid expression, assumed zero
/tmp/textclp4Zm.sma(43) : error 010: invalid function or declaration
/tmp/textclp4Zm.sma(45) : error 021: symbol already defined: "get_user_info"
/tmp/textclp4Zm.sma(4
: warning 203: symbol is never used: "name"
4 Errors.