Jump to content

[req] Teleport system


Nighttrain

Recommended Posts

Posted

hello guys i am looking for a Teleport system

i need something like the Interior file's that yellow arrow stuff

i look around on the community but cant find a good working script

i got an errorcode on 1 of the Scripts

ERROR: Loading script failed: addelevator/elevator.lua:5: unexpected

symbol near '='

i look in to the Elevator script but all is looking good

can someone help me to fix it? or you got a good one?

send it me please

Link from Elevator system :

https://community.multitheftauto.com/in ... ls&id=6647

Posted

thanks for the Reaction but that is one without Markers/arrows or something

so it need to be look like LSPD or CJ house that kind of arrows (free entrance for players)

Posted

Here is the Script what have the error

function elevator (player, cmd, x1, x2, x3, col1, col2, col3, alpha, size ) 
local x, y, z = getElementPosition (player) 
    if x1 and x2 and x3 and col1 and col2 and col3 and alpha and size then 
    local model = 
    px, py, pz = x1, x2 + 2, x3 
    tx, ty, tz = x, y + 2, z 
       marker1 = createMarker ( x, y, z + 1, "arrow",2, col1, col2, col3, alpha ) 
       marker2 = createMarker ( tonumber(x1), tonumber(x2), tonumber(x3) + 1, "arrow", size, col1, col2, col3, alpha ) 
    else 
        outputChatBox ("[invalid Syntax]: /addelevator [x], [y], [z], [Col1], [Col2], [Col3], [Alpha], [size] ", player, 255, 0, 0 ) 
    end 
end 
addCommandHandler("addelevator", elevator ) 
  
addEventHandler("onMarkerHit", root, 
    function(hitPlayer) 
        if isElement(marker1) and (source = marker1) then 
            if (getElementType(hitPlayer) = "player") then 
                    setElementPosition(hitPlayer, px, py, pz) 
                    fadeCamera ( hitPlayer, false, 0.1, 255, 0, 0 )         
                    setTimer ( fadeCamera, 500, 1, hitPlayer , true, 0.5 )  
                end 
            end 
        end 
) 
  
addEventHandler("onMarkerHit", root, 
    function(hitPlayer) 
        if isElement(marker2) and (source = marker2) then 
            if (getElementType(hitPlayer) = "player") then 
                    setElementPosition(hitPlayer, tx, ty, tz) 
                    fadeCamera ( hitPlayer, false, 0.1, 255, 0, 0 )   
                    setTimer ( fadeCamera, 500, 1, hitPlayer , true, 0.5 )  
                end 
            end 
        end 
) 

Posted
function elevator (player, cmd, x1, x2, x3, col1, col2, col3, alpha, size ) 
local x, y, z = getElementPosition (player) 
    if x1 and x2 and x3 and col1 and col2 and col3 and alpha and size then 
    px, py, pz = x1, x2 + 2, x3 
    tx, ty, tz = x, y + 2, z 
       marker1 = createMarker ( x, y, z + 1, "arrow",2, col1, col2, col3, alpha ) 
       marker2 = createMarker ( tonumber(x1), tonumber(x2), tonumber(x3) + 1, "arrow", size, col1, col2, col3, alpha ) 
    else 
        outputChatBox ("[invalid Syntax]: /addelevator [x], [y], [z], [Col1], [Col2], [Col3], [Alpha], [size] ", player, 255, 0, 0 ) 
    end 
end 
addCommandHandler("addelevator", elevator ) 
  
addEventHandler("onMarkerHit", root, 
    function(hitPlayer) 
        if isElement(marker1) and (source = marker1) then 
            if (getElementType(hitPlayer) = "player") then 
                    setElementPosition(hitPlayer, px, py, pz) 
                    fadeCamera ( hitPlayer, false, 0.1, 255, 0, 0 )         
                    setTimer ( fadeCamera, 500, 1, hitPlayer , true, 0.5 ) 
                end 
            end 
        end 
) 
  
addEventHandler("onMarkerHit", root, 
    function(hitPlayer) 
        if isElement(marker2) and (source = marker2) then 
            if (getElementType(hitPlayer) = "player") then 
                    setElementPosition(hitPlayer, tx, ty, tz) 
                    fadeCamera ( hitPlayer, false, 0.1, 255, 0, 0 )   
                    setTimer ( fadeCamera, 500, 1, hitPlayer , true, 0.5 ) 
                end 
            end 
        end 
) 

Posted

still got this error

[18:02:11] Starting addelevator

[18:02:11] SCRIPT ERROR: addelevator/elevator.lua:5: unexpected symbol near '='

[18:02:11] ERROR: Loading script failed: addelevator/elevator.lua:5: unexpected

symbol near '='

Posted
  
function elevator (player, cmd, x1, x2, x3, col1, col2, col3, alpha, size ) 
local x, y, z = getElementPosition (player) 
    if x1 and x2 and x3 and col1 and col2 and col3 and alpha and size then 
        local newV = x2 + 2 
        local yzz = y + 2 
        px, py, pz = x1, newV, x3 
        tx, ty, tz = x, yzz, z 
       marker1 = createMarker ( x, y, z + 1, "arrow",2, col1, col2, col3, alpha ) 
       marker2 = createMarker ( tonumber(x1), tonumber(x2), tonumber(x3) + 1, "arrow", size, col1, col2, col3, alpha ) 
    else 
        outputChatBox ("[invalid Syntax]: /addelevator [x], [y], [z], [Col1], [Col2], [Col3], [Alpha], [size] ", player, 255, 0, 0 ) 
    end 
end 
addCommandHandler("addelevator", elevator ) 
  
addEventHandler("onMarkerHit", root, 
    function(hitPlayer) 
        if isElement(marker1) and (source = marker1) then 
            if (getElementType(hitPlayer) = "player") then 
                    setElementPosition(hitPlayer, px, py, pz) 
                    fadeCamera ( hitPlayer, false, 0.1, 255, 0, 0 )         
                    setTimer ( fadeCamera, 500, 1, hitPlayer , true, 0.5 ) 
                end 
            end 
        end 
) 
  
addEventHandler("onMarkerHit", root, 
    function(hitPlayer) 
        if isElement(marker2) and (source = marker2) then 
            if (getElementType(hitPlayer) = "player") then 
                    setElementPosition(hitPlayer, tx, ty, tz) 
                    fadeCamera ( hitPlayer, false, 0.1, 255, 0, 0 )   
                    setTimer ( fadeCamera, 500, 1, hitPlayer , true, 0.5 ) 
                end 
            end 
        end 
) 
  

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