Jump to content

[HELP] teleport system


Nighttrain

Recommended Posts

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

Also this topic is in Resources!

Link to comment
That code contains something incomplete, just remove Line#4 from elevator.lua file, Line#4 is this:
local model =  

Remove that and then try.

i go try it :) much guys helps already with this but on much changes the error stays :P

i tell you As soon As Posible when i got a result or still the error

Link to comment

This script is badly scripted, i improved it.

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

Link to comment

TAPL thanks for your reaction :) i got no errors now but now is my question

What do i need to fill in at Alpha?

can you make a kind of tutorial what i need to fill in?

because now i need to fill this

/addelevator [x], [y], [z], [Col1], [Col2], [Col3], [Alpha],

the XYZ is 100% clear that is location 1 i think

COl 1,2,3 is i think second location (i am wrong or?) and now

Alpha ?????

size is marker size? or ?

Link to comment

First location is where you were stand at the time you used the command which the second location is what you write within the command, Col1, Col2 and Col3 is rgb color of the marker (number between 0 and 255) and also the alpha 0-255, the size is the size of the marker. No comma is needed when you use the command.

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