[Bug] Random Color in Numberplates
#1

Hello,

i there is a bug with colors of VehicleNumberPlates when i try to use a dynamic colorsystem with format strings...

Explanation:

Код:
new nBShowString[48];
if(VehNBColor[vehicleid] == 1) { format(nBShowString, sizeof(nBShowString), "{#fb1d37}%s", platetext); }

OR

if(VehNBColor[vehicleid] == 1) { format(nBShowString, sizeof(nBShowString), "{%x}%s", GetNBColor(vehicleid), platetext); }

.......so on with some other VehNBColors....

SetVehicleNumberPlate(vehicleid, nBShowString);
>> the Numberplate shows the complete nBShowString incl. hex code and there is no color changed!
Hope you can fix this problem whith format....

- JayTea
Reply
#2

It's {fb1d37} not {#fb1d37}
Reply
#3

no the thing with # is useable too but there is still the same bug
Reply
#4

Does this occur as well when you type '{fb1d37}' instead of '{#fb1d37}'?
Reply
#5

yes this bug occur with your code too

watch yourself...


This isnt a problem in using the right syntax of color embedding it is a problem of format and SetVehicleNumberPlate!
The Function format dont make a difference between a string and a hexcode (maybe the format line converts hexcode to a string)
Reply
#6

make sure you only use 6 chars between { } , else it will not work

http://www.colorpicker.com/


If you still think it is a bug then post GetNBColor(vehicleid)
Reply
#7

I don't get you..

{#fb1d37} works fine for you?

and {fb1d37} too?
Reply
#8

As you can read from previous post, only {fb1d37} will work.
Reply
#9

okay i was confused in using the right syntax of color embedding sorry for this and thank you for help me to solve my problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)