Teleport With Marker
------------------------------------------------------------------------------------------------
local root = getRootElement()
local this = getThisResource()
local resourceRoot = getResourceRootElement(this)
local localPlayer = getLocalPlayer()
local Marker = {}
addEventHandler("onClientResourceStart", resourceRoot,
function()
Marker[1] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[2] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[3] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[4] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[5] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[6] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[7] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[8] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker[9] = createMarker(X, Y, Z, "corona", 10, 0, 0, 0)
Marker example Marker[1] = createMarker(4455.2, -778.9, 60.9, "corona", 10, 0, 0, 0)
>coordinate x y z inizial teleport<
end
)
addEventHandler("onClientResourceStop", root,
function(res)
if res == this then
end
end
)
addEventHandler("onClientMarkerHit", root,
function(player, matchingDimension)
if not matchingDimension then return end
if player == localPlayer and isPedInVehicle(player) then
local vehicle = getPedOccupiedVehicle(player)
if source == Marker[1] then
setElementPosition (vehicle , 4822.8, -1442, 5.3 ) this is x y z teleport arrival
setElementRotation(vehicle ,0,0,0)
setVehicleFrozen ( vehicle , true )
setTimer( setVehicleFrozen, 1000, 1, vehicle, false ) frozen vehicle arrival 1000 is 1 sec. freeze
elseif source == Marker[2] then
elseif source == Marker[3] then
elseif source == Marker[4] then
elseif source == Marker[5] then
elseif source == Marker[6] then
elseif source == Marker[7] then
elseif source == Marker[8] then
elseif source == Marker[9] then
end
end
end
)
------------------------------------------------------
for other info posted here
or posted inzial teleport x y z and arrival x y z
good look!!!!!!!
by
Danger