Jump to content

How to make 2 Teleports ? HELP ME


matito6

Recommended Posts

Posted

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) 
  

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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