SetObjectMaterial Issue
#1

Hey,

So basically my first question is that what is the difference between SetObjectMaterial and SetPlayerObjectMaterial?

Secondly, I'm having a problem. I tried changing an objects texture but it won't fucking change..
On top I Have
pawn Код:
new myobject;
Then I have my object creation code under OnGameModeInIt
pawn Код:
myobject = CreateObject(18783, 496.43228, 2003.58862, 54.59914,   0.00000, 0.00000, 0.00000);
Then I firstly put my SetObjectMaterial code under OnGameModeInIt, to check if it works there. but it didnt.
pawn Код:
SetObjectMaterial(myobject, 0, 14662, "711c", "bwtilebroth", 0);
        SetObjectMaterial(myobject, 1, 14662, "711c", "bwtilebroth", 0);
        SetObjectMaterial(myobject, 2, 14662, "711c", "bwtilebroth", 0);
Then I thought about making a command to change textures. but it didnt work either.
pawn Код:
if (strcmp("/magic", cmdtext, true, 10) == 0)
    {
        SetObjectMaterial(myobject, 0, 14662, "711_c", "bwtilebroth", 0);
        SetObjectMaterial(myobject, 1, 14662, "711_c", "bwtilebroth", 0);
        SetObjectMaterial(myobject, 2, 14662, "711_c", "bwtilebroth", 0);
        return 1;
    }
I really don't know what's the issue, I would also like to know where to put the SetObjectMaterial? What would be its best place to use without putting it in any command. So the textures automatically change without having anyone type anything.

Thanks,
Reply


Messages In This Thread
SetObjectMaterial Issue - by SsHady - 13.07.2016, 12:47
Re: SetObjectMaterial Issue - by Dejan12345 - 13.07.2016, 12:49
Re: SetObjectMaterial Issue - by SsHady - 13.07.2016, 12:51
Re: SetObjectMaterial Issue - by Dejan12345 - 13.07.2016, 12:52
Re: SetObjectMaterial Issue - by DRIFT_HUNTER - 13.07.2016, 12:57
Re: SetObjectMaterial Issue - by Vince - 13.07.2016, 13:25
Re: SetObjectMaterial Issue - by Luicy. - 13.07.2016, 13:27

Forum Jump:


Users browsing this thread: 1 Guest(s)