Kenix Posted December 24, 2010 Share Posted December 24, 2010 now wanted to make the script carry weapons on his back but when jumping and falling etc weapon moves that need to make the weapon was secured to the body normally? screen http://funkyimg.com/u2/404/547/mta-scre ... -25-23.png bug http://funkyimg.com/viewer.php?img=/2/6 ... -35-17.png Link to comment
12p Posted December 24, 2010 Share Posted December 24, 2010 Check out the new weapons Model ID on Map Editor, it will help =) and use: createObject attachElements Link to comment
Kenix Posted December 24, 2010 Author Share Posted December 24, 2010 like here is the code but there is a bug: the weapon passes through the body in some skins if you sit down the weapon above his head: D even if you fell the same. as a glue gun to the body so if you like jumping a weapon too, and so on? function player_Spawn ( ) skin = getElementModel ( source ) notrolley = getAttachedElements ( source ) for k,v in pairs(notrolley) do if getElementType ( v ) == "object" then destroyElement ( v ) end end local x,y,z = getElementPosition ( source ) waepon = createObject ( 356, x, y, z, 0, 0, 0 ) attachElements ( waepon, source, -0.1, -0.20, 0.35, 0.000000, 45.000000, 0 ) end addEventHandler ( "onPlayerSpawn", getRootElement(), player_Spawn ) function player_Quit ( ) notrolley = getAttachedElements ( source ) for k,v in pairs(notrolley) do if getElementType ( v ) == "object" then destroyElement ( v ) end end end addEventHandler ( "onPlayerQuit", getRootElement(), player_Quit ) screens lol Link to comment
Aibo Posted December 24, 2010 Share Posted December 24, 2010 https://wiki.multitheftauto.com/wiki/GetPedBonePosition Link to comment
12p Posted December 24, 2010 Share Posted December 24, 2010 addEventHandler("onClientRender",getRootElement(), function () getPedBonePosition() setElementPosition() end) LOL, I forgot about those things D; Link to comment
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