25.11.2011, 12:13
Hi.
I've got a simple command defined like
which works without any problem. However, when I use strcmp inside it, it always returns 0; - meaning it just pops up "SERVER: Unknown command".
Looks like this (of course I edited it, this is not the whole command just preview.
Anybody knows what's the problem here please? Thanks!
I've got a simple command defined like
Код:
if(!strcmp("/lol", cmdtext, true, 11))
{
Код:
if(!strcmp("/lol", cmdtext, true, 11))
{
new tmp[256], idx;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, RED, "Syntax: /lol something");
return 1;
}
if(strcmp(tmp, "something", true) == 0)
{
// SOMETHING INSIDE HERE
}
return 1;
}
Anybody knows what's the problem here please? Thanks!


