PDA

View Full Version : 3D Text Not formatting


seanny
05/03/2018, 09:38 PM
new string[128];
format(string, sizeof(string), "[House %d] \n For sale: \n Price: %s \n {FFFFFF}\"/buyhouse\"{%06x} to purchase.", i, FormatMoney(HouseInfo[i][HouseMarketPrice]), COLOR_HOUSE >>> 8);

HouseLabel[i] = CreateDynamic3DTextLabel(string, COLOR_HOUSE, HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ]+0.85, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, HouseInfo[i][HouseExteriorVW], HouseInfo[i][HouseExteriorInt], -1);

This is not showing the proper formatting in-game. I've been trying for hours on how to fix it, switching between streamer and SAMP native did not work, changing text size did not work, reformatting did not work. I'm at a loss.

This is the result (Big image):
http://seanmcelholm.com/image/sa-mp-054.png

CantBeJohn
05/03/2018, 10:41 PM
I'd check your "COLOR_HOUSE" define. I'm pretty sure that's the source of your issue.

PepsiCola23
05/03/2018, 11:13 PM
try without the color_house

format(string, sizeof(string), "[House %d] \n For sale: \n Price: %s \n {FFFFFF}\"/buyhouse\"{%06x} to purchase.", i, FormatMoney(HouseInfo[i][HouseMarketPrice]))

seanny
06/03/2018, 12:16 AM
I tried even without that. Ironically though that’s part of what is being rendered.

CantBeJohn
06/03/2018, 12:49 AM
I tried even without that. Ironically though thatís part of what is being rendered.

I wasn't reffering to that part of the code. I was talking about when you use "COLOR_HOUSE" here:

HouseLabel[i] = CreateDynamic3DTextLabel(string, COLOR_HOUSE, HouseInfo[i][HouseExteriorX], HouseInfo[i][HouseExteriorY], HouseInfo[i][HouseExteriorZ]+0.85, 10.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, HouseInfo[i][HouseExteriorVW], HouseInfo[i][HouseExteriorInt], -1);

It'd only make sense that the "COLOR_HOUSE" define here is the source of your problems since the first half of the code which isn't showing is using the color define "COLOR_HOUSE" through the "CreateDynamic3DTextLabel" function. The part that DOES show specifically has it's color set to something else.

seanny
06/03/2018, 10:08 AM
Here is the COLOR_HOUSE variable

#define COLOR_HOUSE 0xFFC16600

EDIT:
Turns out it was the COLOR_HOUSE, the 00 at the end of the hex should be FF

Before:
#define COLOR_HOUSE 0xFFC16600

After:
#define COLOR_HOUSE 0xFFC166FF

Consider this fixed.