SA-MP Forums Archive
Restore object after set material text - 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: Restore object after set material text (/showthread.php?tid=460080)



Restore object after set material text - Fly_luck - 26.08.2013

Here's the problem.
I have a set of dynamic objects created by Streamer.
pawn Код:
CreateDynamicObject
At any moment only one object can be set material text while other objects should stay unchanged as well as the status when they were just created.
So when I switch to the target object which should be set material text, I need to restore the status of the previous one.
But I didn't figure out how.
pawn Код:
SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
I thought the key to restore the object is the parameter "backcolor" of the above function.
I knew it was ARGB format in which "A" means transparency.
so when I set it to 0, the object becomes transparent.
so this won't set the object back to the original status.

Any ideas? help? or suggestions?
Appreciate any of them from you guys!