Om. Posted December 7, 2016 Posted December 7, 2016 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)
iPrestege Posted December 7, 2016 Posted December 7, 2016 attachElements Wiki : This is not compatible with all elements. The following elements are compatible: Markers Blips Objects Players Vehicles Sounds Colshapes Cameras Weapons
Addlibs Posted December 7, 2016 Posted December 7, 2016 (edited) bool createSWATRope ( float fx, float fy, float fZ, int duration ) SWAT ropes aren't elements - the return value (which you store as loc) is just a boolean value (true/false) representing whether the rope was created successfully or not. Edited December 7, 2016 by MrTasty
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