Wiebrendh Posted June 18, 2014 Share Posted June 18, 2014 So, i want to spawn a .wdr from the weapon.img, does not matter which item. How do i do this? I looked trough the native functions, and found: CREATE_OBJECT but i could not figure that out because it needed an intenger value for the object model.. Thanks in advance! Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/ Share on other sites More sharing options...
stef538 Posted June 18, 2014 Share Posted June 18, 2014 well you can try this (Not tested) private model YourModel;private object YourObject;YourModel = "MP4 Or Whatever you want";Function.Call("CREATE_OBJECT", YourModel, Player.character.position.X, Player.character.position.Y, Player.character.position.Z, YourObject, true); Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065621897 Share on other sites More sharing options...
Wiebrendh Posted June 18, 2014 Author Share Posted June 18, 2014 well you can try this (Not tested) private model YourModel;private object YourObject;YourModel = "MP4 Or Whatever you want";Function.Call("CREATE_OBJECT", YourModel, Player.character.position.X, Player.character.position.Y, Player.character.position.Z, YourObject, true); Already tried it, but it does not work.. It says it had unvalid arguments Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065622129 Share on other sites More sharing options...
LordOfTheBongs Posted June 18, 2014 Share Posted June 18, 2014 (edited) i dont think that would be valid code... u do this according to the documentation here... http://www.gtamodding.com/index.php?title=CREATE_OBJECT i forget but i think i use the hexadecimal hash for the glock in my example GTA.Native.Pointer handlePointer = typeof(int);//this will store the object handle which is an integerGTA.Native.Function.Call("CREATE_OBJECT", 0xFA292061, somePos.X, somePos.Y, somePos.Z, handlePointer, true);int objHandle = (int)handlePointer.Value;//now u can only use this object in natives via Function.Call and refer to this handle it is easier to just use the shdn wrapper for the create object native and then it lets u use the object with the natives wrapped in the GTA.Object class... GTA.Object obj = World.CreateObject(new Model(0xFA292061), somePos); Edited June 18, 2014 by LordOfTheBongs Maro Hannover and Wiebrendh 2 Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065622280 Share on other sites More sharing options...
Maro Hannover Posted June 19, 2014 Share Posted June 19, 2014 Thanks Bong i wanted this also Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065630861 Share on other sites More sharing options...
LordOfTheBongs Posted June 19, 2014 Share Posted June 19, 2014 no problem Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065631450 Share on other sites More sharing options...
Rugz007 Posted June 20, 2014 Share Posted June 20, 2014 Now Maro it's good behaviour Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065632725 Share on other sites More sharing options...
Wiebrendh Posted June 20, 2014 Author Share Posted June 20, 2014 Now Maro it's good behaviour Yeah, he learns it way faster than you do stef538 1 Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065633879 Share on other sites More sharing options...
stef538 Posted June 20, 2014 Share Posted June 20, 2014 Hahahaha Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065633895 Share on other sites More sharing options...
Rugz007 Posted June 20, 2014 Share Posted June 20, 2014 Good Joker Link to comment https://gtaforums.com/topic/716970-spawning-a-model-of-weaponimg/#findComment-1065633901 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now