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=345422)



SetObjectMaterialText - SnG.Scot_MisCuDI - 24.05.2012

How can i make it so SetObjectMaterialText replaces ALL objects with that object id? I dont want to go around and find the bill board cords so i just want to replace the original object with SetObjectMaterialText

pawn Код:
SetObjectMaterialText(8328, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -1, -16776961, 1);
    SetObjectMaterialText(8327, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(8293, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9184, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9185, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9186, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9187, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9188, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9189, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9190, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
    SetObjectMaterialText(9191, "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);
Doesnt place the text on it


Re: SetObjectMaterialText - SnG.Scot_MisCuDI - 07.06.2012

bump


Re: SetObjectMaterialText - ikey07 - 07.06.2012

I hope you dont mix objectid with modelid, just make a loop

new Myobjs[10];

MyObjs[0] = CreateObject(....

for(new i; i < sizeof(MyObjs); i++)
{
SetObjectMaterialText(MyObjs[i], "www.SA-BP.com", 0, 140, "Arial", 40000, 0, -32256, -16730675, 1);


}


Re: SetObjectMaterialText - MadeMan - 07.06.2012

You can't use this function on standard San Andreas objects. You need to use RemoveBuildingForPlayer to remove the standard object, add your own object with CreateObject and then use SetObjectMaterialText on it.

https://sampwiki.blast.hk/wiki/RemoveBuildingForPlayer