/me doesnt work
#1

Ok so my friends have given me different versions of /me and none work,heres the cmd:
Код:
if (strcmp("/me", cmdtext, true) == 0)
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
        SendClientMessageToAll(0xFFFF00AA, str);
        return 1;
    }
But it only works when i type just /me,it gives me message USAGE: /me [action] but if i put a space between such as
* Beastlynoob eats bacon i will get unknown command error,can someone help me?
please?
Reply
#2

You forgot to put the length of the command

pawn Код:
if (strcmp("/me", cmdtext, true, 3) == 0) // while 3 is the length of "/me"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)