Jump to content

weapons on the back: D


Kenix

Recommended Posts

Posted

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

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted

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

c04120afa085.jpg

lol

8e875bcce64c.jpg

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted
addEventHandler("onClientRender",getRootElement(), 
function () 
 getPedBonePosition() 
 setElementPosition() 
end) 

LOL, I forgot about those things D;

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...