Jump to content

Problem with moving an attached element


Homie3

Recommended Posts

Hey Ho,

I want to move the attached object "heli" with "setElementAttachedOffsets"...

When I type the command "hoch" it just disappears...

Please help me guys I tried everything. :?:

function boot ( player, command ) 
    local derspieler = ( player ) 
    local x, y, z = getElementPosition ( derspieler ) 
    boot1 = createVehicle(453, x + 30, y, z) 
    bahn = createObject(8171, x + 30, y, z) 
    bahn1 = createObject(8171, x + 30, y, z) 
    bahn2 = createObject(8171, x + 30, y, z) 
    heli = createObject(9241, x + 30, y, z) 
    setVehicleDamageProof(boot1, true) 
    attachElements ( bahn, boot1, 25, 0, 1, 0, 0, 0 ) 
    attachElements ( bahn1, boot1, -25, 0, 1, 0, 0, 0 ) 
    attachElements ( bahn2, boot1, 0, 0, 0.5, 0, 0, 0 ) 
    attachElements ( heli, boot1, 0, -50, 0.5, 0, 0, 0 ) 
    local myBlib = createBlipAttachedTo ( boot1,  57 ) 
end 
  
addCommandHandler ( "boot", boot ) 
  
function nachOben ( player, command ) 
    local x, y, z = getElementPosition ( boot1 ) 
[color=#FF0000]    setElementAttachedOffsets (heli, x, y, 1)[/color] 
end 
  
addCommandHandler ( "hoch", nachOben ) 

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