13.07.2016, 12:47
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
Then I have my object creation code under OnGameModeInIt
Then I firstly put my SetObjectMaterial code under OnGameModeInIt, to check if it works there. but it didnt.
Then I thought about making a command to change textures. but it didnt work either.
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,
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;
pawn Код:
myobject = CreateObject(18783, 496.43228, 2003.58862, 54.59914, 0.00000, 0.00000, 0.00000);
pawn Код:
SetObjectMaterial(myobject, 0, 14662, "711c", "bwtilebroth", 0);
SetObjectMaterial(myobject, 1, 14662, "711c", "bwtilebroth", 0);
SetObjectMaterial(myobject, 2, 14662, "711c", "bwtilebroth", 0);
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;
}
Thanks,