SetObjectMaterial and usage of arrays.
#1

pawn Код:
new MapArray[7];

new v = 0;
MapArray[v++] = CreateDynamicObject(19531,0,0,0,0.000,0.000,0.000,-1,-1,-1,80.000,80.000);
SetDynamicObjectMaterial(MapArray[v], 0, 4, "texture", "name", 0);
MapArray[v++] = CreateDynamicObject(19377,0.110,0.386,-70.515,0.000,0.000,0.000,-1,-1,-1,80.000,80.000);
SetDynamicObjectMaterial(MapArray[v], 0, 0, "texture", "name", 0);
MapArray[v++] = CreateDynamicObject(19377,0.110,0.760,-70.515,0.000,0.000,0.000,-1,-1,-1,80.000,80.000);
SetDynamicObjectMaterial(MapArray[v], 0, 0, "texture", "name", 0);
MapArray[v++] = CreateDynamicObject(19377,0.110,0.599,-70.515,0.000,0.000,0.000,-1,-1,-1,80.000,80.000);
SetDynamicObjectMaterial(MapArray[v], 0, 0, "texture", "name", 0);
MapArray[v++] = CreateDynamicObject(19377,0.277,0.033,-70.515,0.000,0.000,90.000,-1,-1,-1,80.000,80.000);
SetDynamicObjectMaterial(MapArray[v], 0, 1, "texture", "name", -12303292);
MapArray[v++] = CreateDynamicObject(19377,0.471,0.900,-70.515,0.000,0.000,90.000,-1,-1,-1,80.000,80.000);
SetDynamicObjectMaterial(MapArray[v], 0, 0, "texture", "name", 0);
So instead of using
MapArray[0] = CreateDynamicObject
and then
SetObjectMaterial(MapArray[0],.....);

I decided to do it this way.

But the textures are not updating, any idea why?

** Ignore coordinates, model ids, those are just placeholders, I don't want to show my original map.
Reply


Messages In This Thread
SetObjectMaterial and usage of arrays. - by IKnowWhatIAmDoing - 16.07.2015, 11:09
Re: SetObjectMaterial and usage of arrays. - by Vince - 16.07.2015, 13:43

Forum Jump:


Users browsing this thread: 1 Guest(s)