Titles confusing, sorry, but I am confused also. Currently I have a plugin simply repeating what I enter as args.
Example:
amx_whois ding
It does the correct functions and does what I ask it but then also says "Unrecognized Command"
Code:
] amx_whois ding
[WHOIS] Whois: dingUnknown command: amx_whois
] amx_whois ding
[WHOIS] Whois: dingUnknown command: amx_whois
] amx_whoisip dong
[WHOIS] WhoisIP: dongUnknown command: amx_whoisip
]
So I am lost. Any help appreciated.
Here are the important snips:
Code:
public plugin_init() {
register_plugin(PLUGIN_NAME, VERSION, AUTHOR)
register_clcmd("amx_whois", "amx_whois", ADMIN_CHAT, "<name or #userid> - Displays names for Authid")
register_clcmd("amx_whoisip", "amx_whois", ADMIN_CHAT, "<name or #userid> - Displays names for IP")
}
....snipitty snip snip....
public amx_whois(id, level, cid) {
if(!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new cmd[32], arg[32]
read_argv(0, cmd, 31)
read_argv(1, arg, 31)
if(equal(cmd, "amx_whois"))
client_print(id, print_console, "[WHOIS] Whois: %s", arg)
else if(equal(cmd, "amx_whoisip"))
client_print(id, print_console, "[WHOIS] WhoisIP: %s", arg)
return PLUGIN_CONTINUE
}