Jump to content

How to make 2 Teleports ? HELP ME


matito6

Recommended Posts

Welcome. How to make two teleports with this script?

marker = createMarker(-1755, 6658.1000976563, 11.300000190735, "corona", 5, 100, 0, 100, 100) 
  
function teleport(player) 
if getElementType(player)=="player" then 
local vehicle=getPedOccupiedVehicle(player) 
if source == marker then 
setElementPosition(vehicle, -2720.3000488281, 7150.3999023438, 143) 
setElementRotation(vehicle, 0, 0, 0) 
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), teleport) 
  

Link to comment
marker = createMarker(-1755, 6658.1000976563, 11.300000190735, "corona", 5, 100, 0, 100, 100) 
marker2 = createMarker(-2720.3000488281, 7150.3999023438, 143, "corona", 5, 100, 0, 100, 100) 
  
function teleport ( player ) 
    if ( getElementType ( player ) == "player" ) then 
        local vehicle = getPedOccupiedVehicle ( player ) 
        if ( vehicle ) then 
            if ( source == marker ) then 
                setElementPosition ( vehicle, -2720.3000488281, 7145.3999023438, 143 ) 
                setElementRotation ( vehicle, 0, 0, 0 ) 
            elseif ( source == marker2 ) then 
                setElementPosition ( vehicle, -1755, 6655.1000976563, 11.300000190735 ) 
                setElementRotation ( vehicle, 0, 0, 0 ) 
            end 
        end 
    end 
end 
addEventHandler ( "onClientMarkerHit", getRootElement(), teleport ) 

It should create a marker in the place where you teleport at with the first marker, then with the second marker you teleport near the first marker.

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