Jump to content

Teleport script


Deagle

Recommended Posts

So, I have this teleport script, but after I enter in it with the car, it is teleporting me, but I hear a sound like the car has hitten somethig and my car loses all the "health" and starts to burn.

My question is, what lines do I need to add so my vehicle is repaired after the teleport and how can I set the rotation of the car after the teleport.

P.S. The gamemode is play.

marker = createMarker(-657.49468994141, 950.86450195313, 12.451947212219, "corona", 3.5, 255, 255, 0, 255) 
  
function teleport(player) 
if getElementType(player)=="player" then 
local vehicle=getPedOccupiedVehicle(player) 
if source == marker then 
setElementPosition(vehicle, -3322.5373535156, 1776.5373535156, 14.093730926514) 
setVehicleFrozen(vehicle, true) 
setTimer(setVehicleFrozen, 1000, 1, vehicle, false) 
fixVehicle(vehicle) 
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), teleport) 

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