Jump to content

weapons on the back: D


Kenix

Recommended Posts

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

Link to comment

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...