GamerDeMTA Posted March 15, 2013 Posted March 15, 2013 My script doesn't work, it shows the marker but when I go to the marker I don't get teleported. marker = createMarker ( -651.29998779297,954.29998779297,11.10000038147, "cylinder", 2, 0, 255, 0, 225 ) addEventHandler("onMarkerHit",marker, function (player) if (getElementType(player) == "player") then setElementPosition (player,-699.29998779297,964.09997558594,121.19999694824) end end )
Baseplate Posted March 15, 2013 Posted March 15, 2013 marker = createMarker ( -651.29998779297,954.29998779297,11.10000038147, "cylinder", 2, 0, 255, 0, 225 ) addEventHandler("onMarkerHit",marker, function (hitElement) if (getElementType(hitElement) == "player") then setElementPosition (hitElement,-699.29998779297,964.09997558594,121.19999694824) end end )
iPrestege Posted March 15, 2013 Posted March 15, 2013 @ Samer GamerDeMTA Script should work @ GamerDeMTA what's the problem?
GamerDeMTA Posted March 15, 2013 Author Posted March 15, 2013 Now it works, the script's type was as "client", sorry for taking ur time i changed to "server". But also can you give me to put when you hit the marker a GUI with a "close" button for the player, and a sound?
iPrestege Posted March 15, 2013 Posted March 15, 2013 guiSetVisible showCursor playSound onClientMarkerHit
GamerDeMTA Posted March 15, 2013 Author Posted March 15, 2013 guiSetVisible showCursor playSound onClientMarkerHit Hm... And for the Close Button?
GamerDeMTA Posted March 15, 2013 Author Posted March 15, 2013 I'll try, but Idk much about scripting, let's learn
GamerDeMTA Posted March 15, 2013 Author Posted March 15, 2013 I've a problem, I put the GUI in a .LUA and text in a .XML, What I must put after onClientMarkerHit?
iPrestege Posted March 15, 2013 Posted March 15, 2013 check if the player = localPlayer and guiSetVisible and ShowCursor . Edit try this : local marker = createMarker (x,y,z, "cylinder", 2, 0, 255, 0, 170 ) addEventHandler("onClientMarkerHit",marker, function ( player ) if ( player == localPlayer ) then guiSetVisible( Window,true ) showCursor( true ) end end )
GamerDeMTA Posted March 15, 2013 Author Posted March 15, 2013 but, where is the localitation of the Marker's teleport in there?
iPrestege Posted March 15, 2013 Posted March 15, 2013 What you mean ? you mean you wan't to but the GUI Marker in the teleport position? or what the fuc k?
GamerDeMTA Posted March 15, 2013 Author Posted March 15, 2013 No No I want, Forbid it, Is nothing... And now, I did the GUI In a .LUA and .XML what shall I do?
iPrestege Posted March 15, 2013 Posted March 15, 2013 Hmmm...use my code up ^ this one : local marker = createMarker (x,y,z, "cylinder", 2, 0, 255, 0, 170 ) addEventHandler("onClientMarkerHit",marker, function ( player ) if ( player == localPlayer ) then guiSetVisible( Window,true ) showCursor( true ) end end )
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