Jump to content

[HELP] getScreenFromWorldPosition warning


relaxx

Recommended Posts

    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: 

WRLdXtW.png

Can someone help me what is the problem, i dont understand this...

if i delete the tonumber then it makes that: QSyj9tP.png

Link to comment
  • Patrick changed the title to [HELP] getScreenFromWorldPosition warning
  • Moderators
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.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...