"/me" bugged
#1

Hello!
This is my /me.

pawn Код:
if(strcmp(cmdtext, "/me", true) == 0)
    {
        new string[256], sendername[MAX_PLAYER_NAME];
        new idx;
      if(IsPlayerConnected(playerid))
      {
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /me [action]");
                return 1;
            }
                format(string, sizeof(string), "* %s %s", sendername, result);
            }
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            printf("%s", string);
            return 1;
    }
For some reasons, it is bugged and dont work.

if I type "/me"
It returns:
*** Christian_Hammer /me ***

if I type i.e "/me takes out a gun from his bag"
It returns nothing.

Help!
What is wrong?
Reply


Messages In This Thread
"/me" bugged - by Chriham3 - 13.03.2010, 16:59
Re: "/me" bugged - by Naxix - 13.03.2010, 17:04
Re: "/me" bugged - by Chriham3 - 13.03.2010, 17:14
Re: "/me" bugged - by Naxix - 13.03.2010, 17:16
Re: "/me" bugged - by MenaceX^ - 13.03.2010, 17:21
Re: "/me" bugged - by Chriham3 - 13.03.2010, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)