RoadRageRR Posted June 6, 2013 Share Posted June 6, 2013 Ok, so I have looked around the forums and I have found a suitable code to attach a vehicle to a marker. My question is: I have a custom textured andromada replacement and I am wondering how to find the coordinates inside the cargohold to put the marker to attach the car to. I am a novice when it comes to this, so any help would be great! Link to comment
Castillo Posted June 6, 2013 Share Posted June 6, 2013 You can try to approximate, then change it until it suits your needs. Link to comment
Raph Posted June 7, 2013 Share Posted June 7, 2013 Or just type /pos where you want it to be while this script is running: --Client-side addCommandHandler("pos", function() local x, y, z = getElementPosition(localPlayer) outputConsole("X: " .. x .. ", Y: " .. y .. ", Z: " .. z) end ) Just press F8 and copy and paste it in your script. Link to comment
iPrestege Posted June 7, 2013 Share Posted June 7, 2013 Or just type /pos where you want it to be while this script is running: --Client-side addCommandHandler("pos", function() local x, y, z = getElementPosition(localPlayer) outputConsole("X: " .. x .. ", Y: " .. y .. ", Z: " .. z) end ) Just press F8 and copy and paste it in your script. If it's a client side you can use this function to copy it . setClipboard Link to comment
xXMADEXx Posted June 7, 2013 Share Posted June 7, 2013 Or just type /pos where you want it to be while this script is running: --Client-side addCommandHandler("pos", function() local x, y, z = getElementPosition(localPlayer) outputConsole("X: " .. x .. ", Y: " .. y .. ", Z: " .. z) end ) Just press F8 and copy and paste it in your script. He isn't talking about world coordinates. He means coordinates inside the vehicle. Just like SoldSnake14 said, think that you will have to just keep editing the script until you get it correct. Link to comment
Shuvit Posted June 7, 2013 Share Posted June 7, 2013 --syntax attachElements ( element theElement, element theAttachToElement, [ float xPosOffset, float yPosOffset, float zPosOffset, float xRotOffset, float yRotOffset, float zRotOffset ] ) attachElements (createMarker, vehicle,xPosOffset,yPosOffset,zPosOffset) This should help Link to comment
Raph Posted June 7, 2013 Share Posted June 7, 2013 Or just type /pos where you want it to be while this script is running: --Client-side addCommandHandler("pos", function() local x, y, z = getElementPosition(localPlayer) outputConsole("X: " .. x .. ", Y: " .. y .. ", Z: " .. z) end ) Just press F8 and copy and paste it in your script. He isn't talking about world coordinates. He means coordinates inside the vehicle. Just like SoldSnake14 said, think that you will have to just keep editing the script until you get it correct. Ah, well I didn't understand then... Sorry about that. Just do as he said then. Maybe you can try to mess with getElementBoundingBox Link to comment
RoadRageRR Posted June 7, 2013 Author Share Posted June 7, 2013 Thank you all, but I don't need this anymore because I found the resource "glue2" and it works better than what I was trying to do... Thanks anyways... you guys rock! 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