SA-MP Forums Archive
SetObjectMaterialText Color embedding - 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: SetObjectMaterialText Color embedding (/showthread.php?tid=336195)



SetObjectMaterialText Color embedding - NetKiel - 21.04.2012

I tried to make the color embedding work.
But it failed, when I enabled the background.

Whitout it it works.

Code:
pawn Код:
new sign = CreateObject(19481,2041.3943,1344.8367,10.6719,0,0,0,300);
SetObjectMaterialText(sign,"Look {FF0000}here",0,OBJECT_MATERIAL_SIZE_256x128,"Arial",24,0,0xFFFFFFFF,0xFFFFFF00);
Screen:



AW: SetObjectMaterialText Color embedding - xXGaryXx - 21.04.2012

i also have a problem with the colors... i think its a bug -.- when i type in 0x000000FF then it just gets invisible and when I type in 0xCC0000FF for an example it gets blue?! wtf? hope for fix.. or someone can tell me what i do wrong?

Код:
CMD:settext(playerid,params[])
{
	new textstring[24];
	new textsize;
	new fontcol;
	new backcolor;
	if(sscanf(params,"sdhh",textstring,textsize,fontcol,backcolor))
		return SendClientMessage(playerid,0xFF0000,"Format: /settext [Text] [Fontsize] [Fontcol->HEX] [BackCol->HEX]");
	SetObjectMaterialText(testobject,textstring,0,OBJECT_MATERIAL_SIZE_256x128,"Arial",textsize,1,fontcol,backcolor,0);
	return 1;
}



Re: SetObjectMaterialText Color embedding - Vince - 21.04.2012

Colors for materials are now ARGB, not RGBA.