SA-MP Forums Archive
Name colors - 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: Name colors (/showthread.php?tid=408274)



Name colors - REVO-RP - 17.01.2013

So i gotta make so when LSPD goes on duty their name becomes BLUE and Medic becomes pink like in PR-RP or LS-RP
but idk how to make it i tried multiple times


Re: Name colors - LarzI - 17.01.2013

SetPlayerColor, I guess.


Re: Name colors - REVO-RP - 17.01.2013

Quote:
Originally Posted by LarzI
Посмотреть сообщение
SetPlayerColor, I guess.
What do you think i been doing ? i dont know the colors i try but it fails everytime....


Re: Name colors - LarzI - 17.01.2013

Use a color-picker tool which gives you a Hex output. For example this site: http://www.colorpicker.com/

Just select the color you want, copy the hex code above, and use it like this:
pawn Код:
SetPlayerColor( playerid, 0x[HERETHEHEXCODE]FF );

//for example:
SetPlayerColor( playerid, 0xFF0000FF ); //this is 100% red



Re: Name colors - REVO-RP - 17.01.2013

THANKS MAN


Re: Name colors - REVO-RP - 17.01.2013

it worked but now it doesnt


Re: Name colors - azzerking - 17.01.2013

What did you change, since it last worked?


Re: Name colors - REVO-RP - 17.01.2013

Quote:
Originally Posted by azzerking
Посмотреть сообщение
What did you change, since it last worked?
i added some more its just that i cant remember where to put it as i putted it somewhere else then somewhere else idk where to put it code is here
pawn Код:
SendClientMessage(playerid, COLOR_WHITE, "* You are now On Duty with your Medic Job and will receive calls from people in need.");
                        GetPlayerName(playerid,sendername, sizeof,(sendername);
                        GiveNameSpace(sendername);
                        format(string, sizeof(string), "[Advert] Paramedic %s is On Duty, /call 911.", sendername);
                        SetPlayerColor( playerid, 0xE01B6AFF );
                        BroadCast(COLOR_ALLDEPT,string);
                        OnDuty[playerid] = 1;



Re: Name colors - REVO-RP - 17.01.2013

then when i go on it doesnt work


Re: Name colors - azzerking - 17.01.2013

You usually put it under your command structure. Depends which commadn system your using. By that i mean STRCMP, DCMD, ZCMD, etc.