Nighttrain Posted March 17, 2015 Share Posted March 17, 2015 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 Link to comment
xeon17 Posted March 17, 2015 Share Posted March 17, 2015 https://community.multitheftauto.com/in ... s&id=10893 Link to comment
Nighttrain Posted March 17, 2015 Author Share Posted March 17, 2015 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) Link to comment
Tekken Posted March 17, 2015 Share Posted March 17, 2015 You can edit it and make it like that Link to comment
Nighttrain Posted March 17, 2015 Author Share Posted March 17, 2015 i just edit that but the problem is that i got after it an Error Link to comment
Tekken Posted March 17, 2015 Share Posted March 17, 2015 i just edit that but the problem is that i got after it an Error Wath error ? Link to comment
Nighttrain Posted March 17, 2015 Author Share Posted March 17, 2015 ERROR: Loading script failed: addelevator/elevator.lua:5: unexpected symbol near '=' Link to comment
Tekken Posted March 17, 2015 Share Posted March 17, 2015 ERROR: Loading script failed: addelevator/elevator.lua:5: unexpectedsymbol near '=' Post that code. Link to comment
Nighttrain Posted March 17, 2015 Author Share Posted March 17, 2015 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 ) Link to comment
Tekken Posted March 17, 2015 Share Posted March 17, 2015 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 ) Link to comment
Nighttrain Posted March 17, 2015 Author Share Posted March 17, 2015 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 '=' Link to comment
Anubhav Posted March 18, 2015 Share Posted March 18, 2015 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 ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now