Ello there, i've got this problem:
When i try to get TWO arguments for ex:
PHP Code:
public plugin_init() {
...
register_clcmd("say", "c_say");
register_clcmd("say_team", "c_say");
}
public c_say(id) {
new arg1[100];
readv_args(1, arg1, sizeof(arg1) - 1);
client_print(0, print_chat, "[TAG] %s", arg1);
if(contain(arg1, "/settopic") != -1) {
new arg2[50];
readv_args(2, arg2, sizeof(arg2) - 1);
client_print(0, print_chat, "[TAG] Topic set to: %s", arg2);
}
}
It successfully gets what i type and outputs to [TAG] Text...
But if i say /settopic and it just dont get the second arg, so how to do it?
Do i have to get the second argument at very start?
EDIT: Tried putting reading arg2 on top - doesn't work.