scaryface87 Posted July 16, 2014 Posted July 16, 2014 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)
Et-win Posted July 16, 2014 Posted July 16, 2014 getElementPosition setElementPosition onClientRender addCommandHandler --[[And/Or:]] bindKey ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
MTA Team botder Posted July 16, 2014 MTA Team Posted July 16, 2014 Keep it simple: https://wiki.multitheftauto.com/wiki/AttachElements GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
Et-win Posted July 16, 2014 Posted July 16, 2014 Keep it simple:https://wiki.multitheftauto.com/wiki/AttachElements Nvm me ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
scaryface87 Posted July 17, 2014 Author Posted July 17, 2014 function attach() vehicle = getPedOccupiedVehicle ( player ) object = getElementsByType("object") attachElements ( vehicle, object, 0, 0, 5 ) end addCommandHandler("attach",attach) isnt working
Castillo Posted July 17, 2014 Posted July 17, 2014 "object" is a table of elements, you can't use it for attachElements. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
scaryface87 Posted July 18, 2014 Author Posted July 18, 2014 "object" is a table of elements, you can't use it for attachElements. So i cant make it? or how can i make it working
MIKI785 Posted July 18, 2014 Posted July 18, 2014 You have to use specific object... create it using createObject or get it by ID using getElementByID. Lua Scripter Owner of mshost.cz MTA portal.
scaryface87 Posted July 18, 2014 Author Posted July 18, 2014 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)
MIKI785 Posted July 18, 2014 Posted July 18, 2014 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 Owner of mshost.cz MTA portal.
Max+ Posted July 18, 2014 Posted July 18, 2014 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
scaryface87 Posted July 19, 2014 Author Posted July 19, 2014 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 )
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