Material text
#1

Hi all, I have 152 objects, i want to change material text. Do I have create 152 lines with SetObjectMaterialtText fucntion?
Reply
#2

Well, yes!
Or if all your object will have the same MaterialText, use a loop..
Reply
#3

Yes, I want to change the same MaterialText. Can you give me example?
Reply
#4

Up..
Reply
#5

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);
}
Reply
#6

Quote:
Originally Posted by IgrexolonO
View Post
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.
Reply
#7

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)