SetObjectMaterialText
#1

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
Reply
#2

bump
Reply
#3

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);


}
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)