[SOLVED] Standard Chat
#1

- solved
Reply
#2

I can't see what's your porblem? make a copy of your /local...
Change it to what you wanted, and change the command to /public *OR*

I didn't understand what do you mean?...
Reply
#3

- solved
Reply
#4

You mean the text entered by a player to show globally ?
Reply
#5

- solved
Reply
#6

then just remove the word says in the code -.-
Reply
#7

pawn Код:
if (realchat)
    {
      if(gPlayerLogged[playerid] == 0)
      {
        return 0;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
        {
            SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
            return 0;
        }
        GetPlayerName(playerid, sendername, sizeof(sendername));
        new y1,m1,d1;
        new h1,mi1,s1;
        getdate(y1,m1,d1);
        gettime(h1,mi1,s1);
    if(!IsPlayerInAnyVehicle(playerid))
        {
            if(PlayerInfo[playerid][pAdminDuty] == 1)
            {
              format(string, sizeof(string), "Admin Says: %s", text);
                SencClientMessageToAll(0xFFFFFFFF,string);
                format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local Admin): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                ChatLog(string);
            }
            if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
            {
                format(string, sizeof(string), "Stranger Says: %s", text);
                SencClientMessageToAll(0xFFFFFFFF,string);
                format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local Masked): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                ChatLog(string);
            }
            if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
            {
            format(string, sizeof(string), "%s Says: %s", sendername, text);
            SencClientMessageToAll(0xFFFFFFFF,string);
                format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                ChatLog(string);
            }
        }
        else
        {
          new carid = GetPlayerVehicleID(playerid);
          new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
          if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424)
          {

                if(PlayerInfo[playerid][pAdminDuty] == 1)
                {
                  format(string, sizeof(string), "Admin Says: %s", text);
                  SencClientMessageToAll(0xFFFFFFFF,string);
                    format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Admin Local): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                    ChatLog(string);
                }
                if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
                {
                    format(string, sizeof(string), "Stranger Says: %s", text);
                    SencClientMessageToAll(0xFFFFFFFF,string);
                    format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Local): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                    ChatLog(string);
                }
                if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
                {
                format(string, sizeof(string), "%s Says: %s", sendername, text);
                SencClientMessageToAll(0xFFFFFFFF,string);
                    format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Local): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                    ChatLog(string);
                }
          }
          else
          {
            if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
            {

                    if(PlayerInfo[playerid][pAdminDuty] == 1)
                    {
                    format(string, sizeof(string), "Admin Says: %s", text);
                    SencClientMessageToAll(0xFFFFFFFF,string);
                        format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Admin Windows Shut): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                        ChatLog(string);
                    }
                    if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
                    {
                        format(string, sizeof(string), "Stranger Says: %s", text);
                        SencClientMessageToAll(0xFFFFFFFF,string);
                        format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Windows Shut): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                        ChatLog(string);
                    }
                    if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
                    {
                    format(string, sizeof(string), "%s Says: %s", sendername, text);
                    SencClientMessageToAll(0xFFFFFFFF,string);
                        format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Windows Shut): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                        ChatLog(string);
                    }
                }
                else
                {

                    if(PlayerInfo[playerid][pAdminDuty] == 1)
                    {
                    format(string, sizeof(string), "Admin Says: %s", text);
                    SencClientMessageToAll(0xFFFFFFFF,string);
                        format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Admin Windows Open): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                        ChatLog(string);
                    }
                    if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 1)
                    {
                        format(string, sizeof(string), "Stranger Says: %s", text);
                        SencClientMessageToAll(0xFFFFFFFF,string);
                        format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Masked Windows Open): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                        ChatLog(string);
                    }
                    if(PlayerInfo[playerid][pAdminDuty] == 0 && PlayerInfo[playerid][pMaskuse] == 0)
                    {
                    format(string, sizeof(string), "%s Says: %s", sendername, text);
                    SencClientMessageToAll(0xFFFFFFFF,string);
                        format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Windows Open): %s",d1,m1,y1,h1,mi1,s1, sendername, text);
                        ChatLog(string);
                    }
                }
            }
        }
        return 0;
    }
    return 1;
}
Reply
#8

- solved
Reply
#9

Quote:
Originally Posted by Mokerr
And Adil i want to keep it in this style:

Moker: Hello
(So not the whole text & name same colour, I only want the name in different color (depends on your job))
Use SetPlayerColor(playerid,color); if you can, or i will make it for you.
Reply
#10

- solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)