relaxx Posted May 29, 2020 Posted May 29, 2020 for componentName in pairs (getVehicleComponents(v)) do local x,y,z = getVehicleComponentPosition ( v, componentName, "world" ) local wx,wy,wz = getScreenFromWorldPosition ( tonumber(x), tonumber(y), tonumber(z) ) if wx and wy then vehicleComponents[componentName] = {componentName,wx,wy} end end it makes a lot of error: Can someone help me what is the problem, i dont understand this... if i delete the tonumber then it makes that:
Moderators IIYAMA Posted May 29, 2020 Moderators Posted May 29, 2020 39 minutes ago, relaxx said: Can someone help me what is the problem, i dont understand this... Either the vehicle component has no orientation (or maybe the vehicle is streamed out or something else...). if x and y and z then end And if none of components work, then I have no idea. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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