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: Material text (
/showthread.php?tid=410445)
Material text -
Ectazy - 25.01.2013
Hi all, I have 152 objects, i want to change material text. Do I have create 152 lines with SetObjectMaterialtText fucntion?
Re: Material text -
Roach_ - 25.01.2013
Well, yes!
Or if all your object will have the same MaterialText, use a loop..
Re: Material text -
Ectazy - 25.01.2013
Yes, I want to change the same MaterialText. Can you give me example?
Re: Material text -
Ectazy - 26.01.2013
Up..
Re: Material text -
IgrexolonO - 26.01.2013
for(new i = 152; i < ANIM_LIMIT; i++)
{
SetObjectMaterialText(myobject[i], "SA-MP {FFFFFF}0.3{008500}e {FF8200}RC7", 0, OBJECT_MATERIAL_SIZE_256x128,\"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
}
Re: Material text -
Threshold - 26.01.2013
Quote:
Originally Posted by IgrexolonO
for(new i = 152; i < ANIM_LIMIT; i++)
{
SetObjectMaterialText(myobject[i], "SA-MP {FFFFFF}0.3{008500}e {FF8200}RC7", 0, OBJECT_MATERIAL_SIZE_256x128,\"Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
}
|
Err what? Why would you be starting at 152 and going up? And what's with the ANIM_LIMIT? 0_o
pawn Code:
for(new i = 0; i < sizeof(myobject); i++)
{
SetObjectMaterialText(myobject[i], "Your text here...", 0, OBJECT_MATERIAL_SIZE_HERE, "fonthere", 28, 0, 0xFFFFFFFF, 0xFFFFFFFF, OBJECT_MATERIAL_TEXT_ALIGN_HERE);
}
Just make sure you add the objects into an array, then replace the parameters with your own standards accordingly.
Re: Material text -
Ectazy - 26.01.2013
Thanks!