Name colors
#1

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
Reply
#2

SetPlayerColor, I guess.
Reply
#3

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....
Reply
#4

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
Reply
#5

THANKS MAN
Reply
#6

it worked but now it doesnt
Reply
#7

What did you change, since it last worked?
Reply
#8

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;
Reply
#9

then when i go on it doesnt work
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)