Jump to content

[HELP] attachElement to rope.


Om.

Recommended Posts

DEBUG ERROR: bad argument @ 'attachElements' [Expected element at argument 1, got boolean] 

I've no idea why.

 

local helicopter = {
  ["Police Maverick"] = true,
  ["Sparrow"] = true,
  ["Cargobob"] = true,
  ["Hunter"] = true,
}

function SwatRope()
    local myVehicle = getPedOccupiedVehicle(localPlayer)
    if myVehicle and helicopter[getVehicleName(myVehicle)] then
        local x,y,z = getElementPosition(myVehicle)
        local loc = createSWATRope(x, y, z, 10000)
        attachElements(loc, localPlayer, 0, 0, 5)
    end
end
addCommandHandler("rope", SwatRope)

 

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