kacperppl Posted May 30, 2019 Share Posted May 30, 2019 how to do something like in this movie? could I get a ready code for the side door from the ambulance? https://www.youtube.com/watch?v=l4MrKllPDiI Link to comment
Moderators Patrick Posted May 30, 2019 Moderators Share Posted May 30, 2019 https://wiki.multitheftauto.com/wiki/SetVehicleComponentPosition Link to comment
kacperppl Posted May 30, 2019 Author Share Posted May 30, 2019 Im trying and i don't know how to Make it (sorry for my English) Link to comment
JustinMTA Posted May 30, 2019 Share Posted May 30, 2019 In the "Scene nodes browser", you'll see a list of parts with names, like "kit00_steeringwheel". So long story short, if you want the steering wheel to move, refer back to "kit00_steeringwheel" using SetVehicleComponentPosition. Good luck Link to comment
kacperppl Posted May 30, 2019 Author Share Posted May 30, 2019 addCommandHandler("scp", -- short for 'set component position' function() local theVeh = getPedOccupiedVehicle(localPlayer) local getComponent = door_lr_dummy (theVeh) -- returns table with all the components of the vehicle if (theVeh) then for k in pairs (getComponent) do local x, y, z = getVehicleComponentPosition(theVeh, k) --get the position of the component setVehicleComponentPosition(theVeh, k, x+1, y+1, z+1) -- increases by 1 unit end end end ) Link to comment
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