Jump to content

Vehicle break while teleporting


Recommended Posts

Hello,

I would like to make some garages with interiors so I made teleporters. The problem is when I teleport with a vehicle, it breaks and it take fire. If I teleport with a bike, I fall of it and the bike breaks.

The vehicles don't touch the ground after the teleporting.

What could be the problem with that ?

Link to comment

The freeze changes nothing.

Here is the script :

  
                if ( not veh ) then  
                    setElementDimension( player, getElementDimension( other ) ) 
                    setElementInterior( player, getElementInterior( other ) ) 
                    setCameraInterior( player, getElementInterior( other ) ) 
                    setElementPosition( player, getElementPosition( other ) ) 
                    setCameraTarget( player, player ) 
                else 
                    setVehicleFrozen( veh, true ) 
                    setElementDimension( player, getElementDimension( other ) ) 
                    setElementInterior( player, getElementInterior( other ) ) 
                    setCameraInterior( player, getElementInterior( other ) ) 
                    setElementPosition( player, getElementPosition( other ) ) 
                    setCameraTarget( player, player ) 
                    local x,y,z = getElementPosition (other) 
                    setElementDimension( veh, getElementDimension( other ) ) 
                    setElementInterior( veh, getElementInterior( other ) ) 
                    setElementPosition( veh, x,y,z+0.3 ) 
                    setTimer( setVehicleFrozen, 500, 1, veh, false ) 
                end 
  

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...