SA-MP Forums Archive
/c (staff chat problem) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /c (staff chat problem) (/showthread.php?tid=468048)



/c (staff chat problem) - DouglasRamirez - 06.10.2013

Hey Guys,

Another problem I have here.
/c ( THE WHOLE RED CHAT ) is fucked up, I want it to looks like on /a ( The neat one )






Please help


Re: /c (staff chat problem) - SilentSoul - 06.10.2013

Can you show me your scripted for /c ?


Re: /c (staff chat problem) - Superhot - 06.10.2013

Post the /c command.

If theres SendClientMessageToAll, remove it.


Re: /c (staff chat problem) - Danialdano - 06.10.2013

If you want it red and white just put the color u want and the white part you do {FFFFFF}


Re: /c (staff chat problem) - DouglasRamirez - 07.10.2013

Here, sorry for the late reply.
but please help


pawn Код:
CMD:c(playerid, params[]) {
    if((PlayerInfo[playerid][pHelper] >= 2 || PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pDonateRank] >= 5) && advisorchat[playerid]) {
        if(!isnull(params)) {

            new szMessage[128];
            format(szMessage, sizeof(szMessage), "%s %s: %s", ARank(playerid), GetPlayerNameEx(playerid), params);
            SendAdvisorMessage(COLOR_COMBINEDCHAT, szMessage);
            Log("logs/cchat.log", szMessage);
        }
        else SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/c) [staff chat]");
    }
    return 1;
}



Re: /c (staff chat problem) - EiresJason - 07.10.2013

Try this
pawn Код:
#define COL_WHITE           "{FFFFFF}"
#define COL_RED             "{F81414}"
#define COL_GREEN           "{00FF22}"
CMD:c(playerid, params[])
{
    if((PlayerInfo[playerid][pHelper] >= 2 || PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pDonateRank] >= 5) && advisorchat[playerid])
    {
        new msg[128];
        if(sscanf(params,"s[128]",msg)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/c) [staff chat]");
        new szMessage[128];
        format(szMessage, sizeof(szMessage), ""COL_GREEN"[Admin Chat]"COL_GREEN" %s "COL_WHITE"%s: %s", ARank(playerid), GetPlayerNameEx(playerid), msg);
        SendAdvisorMessage(COLOR_COMBINEDCHAT, szMessage);
        Log("logs/cchat.log", szMessage);
    }
    else SendClientMessageEx(playerid,-1,"ERROR: This command is for staff only!");
    return 1;
}



Re: /c (staff chat problem) - DouglasRamirez - 07.10.2013

Where should I put this?

pawn Код:
#define COL_WHITE           "{FFFFFF}"
#define COL_RED             "{F81414}"
#define COL_GREEN           "{00FF22}"



Re: /c (staff chat problem) - EiresJason - 07.10.2013

Where the rest of your defines are.

Just as long as they're below your #includes.


Re: /c (staff chat problem) - DouglasRamirez - 07.10.2013

then it will look like the /a ?


Re: /c (staff chat problem) - EiresJason - 07.10.2013

Yeah.

If it doesn't, post a screenshot.