SetObjectMaterialText
#1

pawn Код:
CMD:testsign(playerid, params[])
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x,y,z);
    new idx = gettestSign();
    sSigns[idx] = CreateDynamicObject(19353, x,y,z,0,0,0,0,0,0,200.0);
    SetObjectMaterialText(sSigns[idx], "te {FFFFFF}s{008500}t {FF8200}t test", 0, 250,\
    "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
    return 1;
}
How do I make this work?
Reply
#2

Could you please tell us whats the problem currently with your code and what do you expect from the code.
Reply
#3

It spawns a small wall and I want it to add the text to it but nothing's showing up.
Reply
#4

1. What are sSigns and gettestSign?
2. You're creating a dynamic object but not using the streamer's SetDYNAMICObjectMaterialText function.
3. You're setting the dynamic object's 'playerid' parameter to 0.
4. You may have mixed up ARGB with RBGA. Alpha goes first in this case, not like in client messages etc.
Reply
#5

*facepalm*
I had to use SetDynamicObjectMaterialText, of course.
Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)