SA-MP Forums Archive
SetObjectMaterialText - 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: SetObjectMaterialText (/showthread.php?tid=435565)



SetObjectMaterialText - BigGroter - 07.05.2013

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?


Re: SetObjectMaterialText - Yashas - 07.05.2013

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


Re: SetObjectMaterialText - BigGroter - 07.05.2013

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


Re: SetObjectMaterialText - MP2 - 07.05.2013

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.


Re: SetObjectMaterialText - BigGroter - 07.05.2013

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