SetObjectMaterialText
#1

here is my code
pawn Код:
object1 = CreateDynamicObject(4732, 2086.00854, 1577.93750, 23.95020,   0.00000, 0.00000, 321.63171);
    SetObjectMaterialText(object1, "{33CC00}Las Venturas {0000FF}COPS {FF0099}AND {CC0000}ROBBERS", 2, OBJECT_MATERIAL_SIZE_256x128,
    "Arial", 24, 0, 0xFF00FFFF, 0xFF00008B, OBJECT_MATERIAL_TEXT_ALIGN_LEFT);
it is not changing the text
and tried setting material index to 0

EVEN TRIED Setting object material first
Reply
#2

Hey,

I am not really sure but I think it is not possible to use SetObjectMaterialText when you have created the Object with CreateDynamicObject. So you could try to use CreateObject instead of CreateDynamicObject (or SetDynamicObjectMaterialText when using CreateDynamicObject) and maybe it will work then.
Please show me your solution when it works

Regards,
Max
Reply
#3

Howdy mate, you've used CreateDynamicObject which is a function from the streamer, however you used the SetObjectMaterial which is the normal SA-MP function, therefore it won't work on dynamic objects. Anyways, in case you want to use the streamed objects with material text, this is the function:

pawn Код:
SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
Hope that helped
Reply
#4

Thank you guyz +repped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)