SA-MP Forums Archive
How to add texture in GameMode with objects problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to add texture in GameMode with objects problem (/showthread.php?tid=662796)



How to add texture in GameMode with objects problem - OPcode - 11.01.2019

Hello,

Can somebody make me how or to explain how to add texture to the server, I have the textures sent by my friend, I insert it under OnGameModeInit, objects are CreateDynamicObject, I enter the server no textures on the walls or on the floor, somewhere there is not anywhere, if someone explain everything he needs to be rewarded.

Example my textures:
Код:
CreateDynamicObject(1319, 1971.152710, -2036.959473, 13.017379, 0.000000, 0.000000, 90.000000);
	       CreateDynamicObject(1714, 1725.140991, -1777.156982, 12.916000, 0.000000, 0.000000, 308.000000);

	new cobj0 = CreateDynamicObject(19791, 1990.125610, -2047.354736, 2.585479, 0.000000, 0.000000, 141.300018);
	SetDynamicObjectMaterial(cobj0, 0, 4835, "airoads_las", "snpedtest1");


	new cobj1 = CreateDynamicObject(19791, 2022.110352, -2057.372314, 2.589478, 0.000000, 0.000000, 0.000000);
	SetDynamicObjectMaterial(cobj1, 0, 7555, "bballcpark1", "ws_carparknew1");


	new cobj2 = CreateDynamicObject(8650, 2041.142456, -2062.727783, 12.810461, 0.000000, 0.000000, -270.000000);
	SetDynamicObjectMaterial(cobj2, 0, 4835, "airoads_las", "weewall256");

	       CreateDynamicObject(1319, 1971.152710, -2042.699585, 13.017379, 0.000000, 0.000000, 90.000000);

	new cobj3 = CreateDynamicObject(19791, 2012.110596, -2057.372314, 2.589478, 0.000000, 0.000000, 0.000000);
	SetDynamicObjectMaterial(cobj3, 0, 7555, "bballcpark1", "ws_carparknew1");


	new cobj4 = CreateDynamicObject(8947, 1983.755493, -2048.414795, 9.513280, 0.000000, 0.000000, 270.000000);
	SetDynamicObjectMaterial(cobj4, 512, 10356, "groundbit_sfs", "ws_hextile");

	       CreateDynamicObject(737, 1974.085938, -2044.633911, 12.686917, 0.000000, 0.000000, -360.000000);
	       CreateDynamicObject(970, 1811.669189, -1874.573120, 12.946000, 0.000000, 0.000000, 90.000000);

	new cobj5 = CreateDynamicObject(8947, 1990.604736, -2052.558594, 9.517283, 0.000000, 0.000000, 270.000000);
	SetDynamicObjectMaterial(cobj5, 512, 10356, "groundbit_sfs", "ws_hextile");

	       CreateDynamicObject(970, 1809.607544, -1872.526978, 12.946000, 0.000000, 0.000000, 179.999893);
	       CreateDynamicObject(737, 2000.376831, -2056.042236, 12.686917, 0.000000, 0.000000, -360.000000);
	       CreateDynamicObject(970, 1811.669189, -1878.389404, 12.946000, 0.000000, 0.000000, 90.000000);

	new cobj6 = CreateDynamicObject(8947, 1995.065674, -2055.020264, 9.514282, 0.000000, 0.000000, 270.000000);
	SetDynamicObjectMaterial(cobj6, 512, 10356, "groundbit_sfs", "ws_hextile");

	       CreateDynamicObject(970, 1811.669189, -1882.493652, 12.946000, 0.000000, 0.000000, 90.000000);
	       CreateDynamicObject(1319, 1971.152710, -2048.209961, 13.017379, 0.000000, 0.000000, 90.000000);

	new cobj7 = CreateDynamicObject(8650, 2010.642700, -2062.727783, 12.810461, 0.000000, 0.000000, -270.000000);
	SetDynamicObjectMaterial(cobj7, 0, 4835, "airoads_las", "weewall256");



Re: How to add texture in GameMode with objects problem - GeorgeLimit - 11.01.2019

are sure you already spawn?


Re: How to add texture in GameMode with objects problem - OPcode - 11.01.2019

I do not understand ?


Re: How to add texture in GameMode with objects problem - H4bdel - 11.01.2019

I think you forgot one parameter at the SetDynamicObjectMaterial

try

SetDynamicObjectMaterial(cobj0, 0, 4835, "airoads_las", "weewall256", 0);


Re: How to add texture in GameMode with objects problem - OPcode - 11.01.2019

Not working again,
2 errors
\gamemodes\grandlarc.pwn(355) : error 001: expected token: ",", but found ";"
\gamemodes\grandlarc.pwn(745) : error 001: expected token: ",", but found ";"


Re: How to add texture in GameMode with objects problem - H4bdel - 11.01.2019

Show those 2 lines


Re: How to add texture in GameMode with objects problem - OPcode - 11.01.2019

(355)SetDynamicObjectMaterial(cobj0, 0, 4835, "airoads_las", "snpedtest1", 0;

(745)SetDynamicObjectMaterial(cobj66, 0, 10765, "airportgnd_sfse", "sf_pave2", 0;


Re: How to add texture in GameMode with objects problem - H4bdel - 11.01.2019

You forgot to add a ")" before the ";"


Re: How to add texture in GameMode with objects problem - OPcode - 11.01.2019

how to add it fast??


Re: How to add texture in GameMode with objects problem - ShadowMortar - 12.01.2019

SetDynamicObjectMaterial(cobj0, 0, 4835, "airoads_las", "snpedtest1", 0);
SetDynamicObjectMaterial(cobj66, 0, 10765, "airportgnd_sfse", "sf_pave2", 0);