Jump to content

How to glue an vehicle / plane to an object?


Recommended Posts

Posted

Hello ,

How can i glue an vehicle and or plane to an object wich can move?

I wanna also deattach the plane / vehicle.

(like if there is an admin spawned car that i can use /gluecar that it glues the car for example)

Posted
  
function attach() 
vehicle = getPedOccupiedVehicle ( player ) 
object = getElementsByType("object") 
 attachElements ( vehicle, object, 0, 0, 5 ) 
end 
addCommandHandler("attach",attach) 
  

isnt working

Posted

"object" is a table of elements, you can't use it for attachElements.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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) 
  
  

Posted

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) 
  

Lua Scripter

?ucet=miki_cz

Owner of mshost.cz MTA portal.

Posted
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 
) 

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted

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 
) 
  

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