Jump to content

How to glue an vehicle / plane to an object?


Recommended Posts

Bad argument at getpedocupiedvehicle

and bad argument at attachelements expected argument at 1, got boolean

  
  
testMarker = createMarker(-1456.7243652344, 532.509765625, 18.010332107544, "cylinder", 7, 100, 100, 100) 
  
  
function attach() 
vehicle = getPedOccupiedVehicle ( player ) 
 attachElements ( vehicle, testMarker, 0, 0, 5 ) 
end 
addCommandHandler("attach",attach) 
  
  

Link to comment

Player isn't defined...

testMarker = createMarker(-1456.7243652344, 532.509765625, 18.010332107544, "cylinder", 7, 100, 100, 100) 
  
  
function attach(player) 
vehicle = getPedOccupiedVehicle ( player ) 
 attachElements ( vehicle, testMarker, 0, 0, 5 ) 
end 
addCommandHandler("attach",attach) 
  

Link to comment
not working nothing in debug too

--ClientSide ,

Marker = createMarker(-1456.7243652344, 532.509765625, 18.010332107544, "cylinder", 7, 100, 100, 100) 
addCommandHandler ( 'attach', 
function ( ) 
 local nMax = getPedOccupiedVehicle ( localPlayer ) 
   if ( nMax ) then 
   attachElements (Marker, nMax ) 
   end 
end 
) 
Link to comment

It was meant to be attached to the marker and not the marker to the vehicle

I tought something like this but it isnt working nothing in debugscript

  
  
Marker = createMarker(-1456.7243652344, 532.509765625, 18.010332107544, "cylinder", 7, 100, 100, 100) 
addCommandHandler ( 'attach', 
function ( ) 
 local nMax = getPedOccupiedVehicle ( localPlayer ) 
   if ( nMax ) then 
   attachElements (nMax, Marker ) 
   end 
end 
) 
  

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