1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.36 Bug Reporting thread
    Solutions and more information may already be available.

Teleport to custom coordinates and detect a closed road

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Neo. 2, Jul 18, 2025 at 7:16 PM.

  1. Neo. 2

    Neo. 2
    Expand Collapse

    Joined:
    Jan 21, 2025
    Messages:
    2
    Hi,

    I have the following code:

    Teleport when not known z axis, +1 meter above terrain (Also, I would appreciate it if someone knew another method to teleport to x, y without knowing the z axis, with a small code block):
    x=-777 y=1700 p=Engine.castRay(vec3(x,y,99999),vec3(x,y,-99999),1,1) if p then be:getPlayerVehicle(0):setPositionNoPhysicsReset(vec3(x,y,p.pt.z+1)) end

    When you know all coordinates:
    be:getPlayerVehicle(0):setPosition(vec3(x, y, z))

    Is it possible to teleport to a closed road after one of the above commands is executed?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice