Colour embedding goes wrong again...
#5

I tried to remove that space and the whole message successfully displayed,
but that bug still occurs.

The same problem occurs in number plates. Here's an example:
Код:
SetVehicleNumberPlate(vid,"{FF0000}管理員車輛");
Result:



Код:
SetVehicleNumberPlate(vid,"{FF0000}管{000000}理員車輛");
Result:


Changing the colour of the whole text is okay, but doesn't for embedding two or more colours.

Some more example:
Код:
SetVehicleNumberPlate(vid,"{FF0000}管理{000000}員車輛");
Only the last character is black.


Код:
SetVehicleNumberPlate(vid,"{FF0000}管理員{000000}車輛");
or
Код:
SetVehicleNumberPlate(vid,"{FF0000}管理員車{000000}輛");
and even
Код:
SetVehicleNumberPlate(vid,"{FF0000}{000000}管理員車輛");
are all red for all of the characters.

Hope it will be useful.

EDIT:
Finally I think I found the offset sequence.
I use this to find that:
Код:
SendClientMessageToAll(0xFFFFFFFF,"{FF0000}一{000000}二三四五六七八九十一二三四五六七八九十");
Just ignore the first color FF0000 (because it works fine).
When a colour is added after the 1st character, it will have an offset of 1 character, i.e. it actually takes effect after the 2nd character.
Код:
SendClientMessageToAll(0xFFFFFFFF,"{FF0000}一二三四五六七八{000000}九十一二三四五六七八九十");
This time the colour is added after the 8th character, and have an offset of 8 characters,i.e. it takes effect after the 16th character.

The same for this:
Код:
SendClientMessageToAll(0xFFFFFFFF,"一{000000}01234567890123456789");
No matter the characters are 8-bit or 16-bit, when there's a 16-bit character, the bug occurs.
Reply


Messages In This Thread
Colour embedding goes wrong again... - by leong124 - 30.11.2010, 08:59
Re: Colour embedding goes wrong again... - by cessil - 30.11.2010, 09:22
Re: Colour embedding goes wrong again... - by leong124 - 30.11.2010, 09:25
Re: Colour embedding goes wrong again... - by Kalcor - 30.11.2010, 11:06
Re: Colour embedding goes wrong again... - by leong124 - 30.11.2010, 11:48
Re: Colour embedding goes wrong again... - by Kalcor - 01.12.2010, 01:30
Re: Colour embedding goes wrong again... - by leong124 - 01.12.2010, 02:30

Forum Jump:


Users browsing this thread: 1 Guest(s)