Chat problem
#7

I saw example but I do not know how ... Maybe you can help
at least show me how to do this command that is to be made after we have to do

pawn Код:
if(strcmp(cmd, "/b", true) == 0)//local ooc
    {
      if(IsPlayerConnected(playerid))
      {
        if(gPlayerLogged[playerid] == 0)
        {
          SendClientMessage(playerid, COLOR_GREY, "  You havent logged in yet !");
          return 1;
        }
            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: /b [local ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "%s Says: (( %s ))", sendername, result);
            ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            printf("%s", string);
        }
        return 1;
    }
Reply


Messages In This Thread
Chat problem - by LiDeRu`s - 13.02.2010, 19:37
Re: Chat problem - by SloProKiller - 13.02.2010, 19:39
Re: Chat problem - by Eazy_Efolife - 13.02.2010, 19:40
Re: Chat problem - by LiDeRu`s - 13.02.2010, 19:41
Re: Chat problem - by LiDeRu`s - 13.02.2010, 22:19
Re: Chat problem - by Fedee! - 13.02.2010, 22:23
Re: Chat problem - by LiDeRu`s - 14.02.2010, 01:31

Forum Jump:


Users browsing this thread: 2 Guest(s)