chat problem
#3

pawn Код:
if(strcmp(cmd, "/trolchat", true) == 0 || strcmp(cmd, "/ttc", true) == 0)
    {
        new stri[128];
        new message[128];
        if(sscanf(params,"s", message)) return SendClientMessage(playerid, COLOR_WHITE, "TROLL:  /ttc [MESSAGE]");
        {
            if(PlayerInfo[playerid][ptroll] >= 1)
            {
                if(strlen(message) < 1)
                {
                    SendClientMessage(playerid, COLOR_WHITE, "TROLL:  /ttc [MESSAGE]");
                }
                else
                {
                    format(stri, sizeof(stri), "[TROLL OOC] %s says (Level %d): %s", sendername, PlayerInfo[playerid][ptroll], message);

                    for(new i = 0; i < MAX_PLAYERS; i++)
                    {
                        if(IsPlayerConnected(i) && PlayerInfo[i][ptroll] >= 1)
                        {
                            SendClientMessage(i, COLOR_WHITE, stri);
                        }
                    }
                }
            }
        return 1;
    }
Untested but should work.
Reply


Messages In This Thread
chat problem - by kepa333 - 06.07.2012, 14:48
Re: chat problem - by .FuneraL. - 06.07.2012, 14:57
Re: chat problem - by milanosie - 06.07.2012, 14:57
Re: chat problem - by kepa333 - 06.07.2012, 15:33
Re: chat problem - by milanosie - 06.07.2012, 15:38
Re: chat problem - by kepa333 - 06.07.2012, 16:07
Re: chat problem - by kepa333 - 08.07.2012, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)