SA-MP Forums Archive
How to adding color name - 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: How to adding color name (/showthread.php?tid=480040)



How to adding color name - warlord321 - 08.12.2013

how to add / set color name if they on duty ? like lspd ?

ex : am a government and i want to duty, but my name is not showing the color like green color or something when I was on duty

how to fix that ?

here the cmd for government

pawn Код:
CMD:se(playerid, params[])
{
    if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
    {
        if(IsPlayerInRangeOfPoint(playerid,3,365.34,150.97,1025.79))
        {
            ShowPlayerDialog(playerid, SEMENU, DIALOG_STYLE_LIST, "Government","Duty\nUniforms\nEquipment", "Select", "Cancel");
        }
        else
        {
            SendClientMessageEx(playerid, COLOR_WHITE, "You aren't in range of your Senate lockers.");
        }
    }
    return 1;
}



Re: How to adding color name - Mitchy - 08.12.2013

Use SetPlayerColor.

For Example (Put this in your SEMENU response) (Dont actually use this just refer to it)

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case SEMENU:
        {
            if(!response) return 1;
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        SendClientMessage(playerid, -1, "You are now on duty");
                        SetPlayerColor(playerid, COLOR_HERE);
                    }
                }
            }
        }
    }
    return 1;
}