RoadRageRR Posted June 6, 2013 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!
Castillo Posted June 6, 2013 Posted June 6, 2013 You can try to approximate, then change it until it suits your needs.
Raph Posted June 7, 2013 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.
iPrestege Posted June 7, 2013 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
xXMADEXx Posted June 7, 2013 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.
Shuvit Posted June 7, 2013 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
Raph Posted June 7, 2013 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
RoadRageRR Posted June 7, 2013 Author 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!
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