17.09.2012, 10:23
So i see many people making topics about how to make Words appear on Object, So below i will be posting the Code for you to use to be able to actually see it.
First off, Never do this using CreateDynamicObject in this text. Due to it will just show the Object, You must use CreateObject. Also You need to get the X,Y,Z Cords for the Object and then the rest is basically simple from wiki.
All you have to do, is first Define the New text names. Then place these under your Map Items Either CreateDynamicObject Or CreateObject
Do not ask me questions on what each part is, due to i cant be bothered typing it in, since its almost 1 am for me here. Just follow these Lists on what each part does.
First off, Never do this using CreateDynamicObject in this text. Due to it will just show the Object, You must use CreateObject. Also You need to get the X,Y,Z Cords for the Object and then the rest is basically simple from wiki.
All you have to do, is first Define the New text names. Then place these under your Map Items Either CreateDynamicObject Or CreateObject
Код:
new text = CreateObject(19355, 1422.34, -1178.02, 31.75, 0.00, 0.00, 90.00); SetObjectMaterialText(text, "\nLos Santos\nPolice Department", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 30, 1, 0xFF919191, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER); new text1 = CreateObject(19355, 1310.01, -1369.42, 19.05, 0.00, 0.00, 90.00); SetObjectMaterialText(text1, "Verona Beach\nCentral Bank", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial", 30, 1, 0xFF919191, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
objectid The ID of the object to replace the texture of with text.
text The text to show on the object.
materialindex The object's material index to replace with text.
materialsize The size of the material.
fontface The font to use.
fontsize The size of the text (MAX 255).
bold Bold text. Set to 1 for bold, 0 for not.
fontcolor The color of the text, in ARGB format.
backcolor The background color, in ARGB format.
textalignment The alignment of the text (default: left).
Returns This function doesn't return a specific value