SetObjectMaterial -
tony_fitto - 19.04.2012
Hi Guys,
I need some help, I've tried the new function SetObjectMaterial();
When I first tested it I got it to work, but I the second time I didn't, can anyone tell me whats wrong with this since the Texture won't change on this object?
pawn Код:
TestObject = CreateObject(19449, 969.92, -1419.15, 14.26, 0.00, 0.00, 90.00);
SetObjectMaterial(TestObject, 0, 19449, "carshow_sfse", "concpanel_la", 0xFFFFFFFF);
Re: SetObjectMaterial -
Infamous - 19.04.2012
pawn Код:
TestObject = CreateObject(19449, 969.92, -1419.15, 14.26, 0.00, 0.00, 90.00);
SetObjectMaterial(TestObject, 0, 11317, "carshow_sfse", "concpanel_la", 0xFFFFFFFF);
Try that
Re: SetObjectMaterial -
tony_fitto - 19.04.2012
Quote:
Originally Posted by Infamous
pawn Код:
TestObject = CreateObject(19449, 969.92, -1419.15, 14.26, 0.00, 0.00, 90.00); SetObjectMaterial(TestObject, 0, 11317, "carshow_sfse", "concpanel_la", 0xFFFFFFFF);
Try that
|
Thanks mate, works perfect.
But some how I get this werd error on the texture.
Anyone knows how to fix this or what I have done wrong with it?
Re: SetObjectMaterial -
IstuntmanI - 19.04.2012
Replace 0xFFFFFFFF with 0, from SetObjectMaterial.
Re: SetObjectMaterial -
tony_fitto - 19.04.2012
Quote:
Originally Posted by costel_nistor96
Replace 0xFFFFFFFF with 0, from SetObjectMaterial.
|
Thanks man, but it didn't help still the same color...
Re: SetObjectMaterial -
Libra_PL - 19.04.2012
Well, just remove that 0xFFFFFFFF and don't add anything there:
pawn Код:
TestObject = CreateObject(19449, 969.92, -1419.15, 14.26, 0.00, 0.00, 90.00);
SetObjectMaterial(TestObject, 0, 11317, "carshow_sfse", "concpanel_la");
Re: SetObjectMaterial -
IstuntmanI - 19.04.2012
Quote:
Originally Posted by Libra_PL
Well, just remove that 0xFFFFFFFF and don't add anything there:
pawn Код:
TestObject = CreateObject(19449, 969.92, -1419.15, 14.26, 0.00, 0.00, 90.00); SetObjectMaterial(TestObject, 0, 11317, "carshow_sfse", "concpanel_la");
|
I said the same, if you don't complete the color parameter, it will be 0, so this don't work (he already said).
Try to remake again SetObjectMaterial, looking at wiki:
https://sampwiki.blast.hk/wiki/SetObjectMaterial
Re: SetObjectMaterial -
tony_fitto - 19.04.2012
Quote:
Originally Posted by costel_nistor96
|
Yeah well thats what I did, first I tried removing 0xFFFFFFF to 0, now I've even tried removing it like he said, so I doesn't have anything on the color, still the same.
And If I'm not incorrect 0xFFFFFF is white...
AW: SetObjectMaterial -
olaf137 - 19.04.2012
You used the wrong objectid:
Код:
TestObject = CreateObject(19449, 969.92, -1419.15, 14.26, 0.00, 0.00, 90.00);
SetObjectMaterial(TestObject, 0, 19449, "carshow_sfse", "concpanel_la", 0xFFFFFFFF);
The modelid which is used in SetObejctMaterial is the ID of the object which has the texture.
You used the same objectid. Thats why it didn't work.
Re: AW: SetObjectMaterial -
tony_fitto - 19.04.2012
Quote:
Originally Posted by olaf137
You used the wrong objectid:
Код:
TestObject = CreateObject(19449, 969.92, -1419.15, 14.26, 0.00, 0.00, 90.00);
SetObjectMaterial(TestObject, 0, 19449, "carshow_sfse", "concpanel_la", 0xFFFFFFFF);
The modelid which is used in SetObejctMaterial is the ID of the object which has the texture.
You used the same objectid. Thats why it didn't work.
|
If you read the first post thats what I did, but when I did that it didn't change the texture, now it have but the color on the object is not white like the texture are it's gray...