Local Chat Problem.
#5

Quote:
Originally Posted by MikeEd
Посмотреть сообщение
what command do you use for local chat?
You mean (/o)oc ? or (/b) ?
(/o)oc CMD :
pawn Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet");
                return 1;
            }
            if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "The OOC channel has been disabled by an Admin");
                return 1;
            }
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced");
                return 1;
            }
            new result[64];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && ((cmdtext[idx] <= ' ')))
            {
                idx++;
            }
            new offset = idx;
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GREY, "USAGE: (/o)oc [ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "(( %s: %s ))", sendername, result);
            OOCOff(COLOR_OOC,string);
            printf("%s", string);
        }
        return 1;
    }
(/b) Command :
pawn Код:
if(strcmp(cmd, "/b", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
                return 1;
            }
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_WHITE, "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_GREY, "USAGE: /b [local ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "%s Says: (( %s ))", sendername, result);
            ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
            printf("%s", string);
        }
        return 1;
    }
Reply


Messages In This Thread
Local Chat Problem. - by EgyptForLife - 09.09.2014, 19:59
Re: Local Chat Problem. - by MikeEd - 09.09.2014, 20:27
Re: Local Chat Problem. - by EgyptForLife - 09.09.2014, 21:22
Re: Local Chat Problem. - by MikeEd - 09.09.2014, 21:25
Re: Local Chat Problem. - by EgyptForLife - 09.09.2014, 21:32
Re: Local Chat Problem. - by MikeEd - 09.09.2014, 21:38
Re: Local Chat Problem. - by xSmilE - 09.09.2014, 21:46
Re: Local Chat Problem. - by EgyptForLife - 09.09.2014, 22:03
Re: Local Chat Problem. - by xSmilE - 09.09.2014, 22:06
Re: Local Chat Problem. - by EgyptForLife - 09.09.2014, 22:21

Forum Jump:


Users browsing this thread: 1 Guest(s)