[HELP]Use ( as a command? hmmm
#1

Hey guys, i was just wondering if this command would work

pawn Код:
if(!strcmp(cmdtext, "(", true, 1))//local ooc
    {
      if(IsPlayerConnected(playerid))
      {
        if(AccountInfo[playerid][Logged] == 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;
    }
If i done something wrong please say thanks

-Mike.
Reply


Messages In This Thread
[HELP]Use ( as a command? hmmm - by [NYRP]Mike. - 13.10.2009, 21:30
Re: [HELP]Use ( as a command? hmmm - by MartinDaniel - 13.10.2009, 21:45
Re: [HELP]Use ( as a command? hmmm - by [NYRP]Mike. - 13.10.2009, 21:51
Re: [HELP]Use ( as a command? hmmm - by MartinDaniel - 13.10.2009, 21:52
Re: [HELP]Use ( as a command? hmmm - by [NYRP]Mike. - 13.10.2009, 21:58
Re: [HELP]Use ( as a command? hmmm - by Born2die - 13.10.2009, 22:22
Re: [HELP]Use ( as a command? hmmm - by MartinDaniel - 13.10.2009, 22:29
Re: [HELP]Use ( as a command? hmmm - by [NYRP]Mike. - 13.10.2009, 23:22
Re: [HELP]Use ( as a command? hmmm - by woot - 14.10.2009, 11:28
Re: [HELP]Use ( as a command? hmmm - by Correlli - 14.10.2009, 13:51

Forum Jump:


Users browsing this thread: 2 Guest(s)