joedajoester Posted October 5, 2012 Share Posted October 5, 2012 (edited) I need this script to only teleport a player, not any other element, also wont teleport them while in a car. I got it working but i edited it a little and fergot what i did and now it teleports everything, even this dxdraw text i have in the marker. miniadminbase = createMarker(-1749, -3030, 53.6, 'cylinder', 1.5, 255, 0, 0, 150) function duty(player, matchingDimension) if getElementType (player) then setElementPosition (player, 0, 0, 5 ) end end addEventHandler("onMarkerHit",miniadminbase,duty) Thanks Edited October 6, 2012 by Guest Link to comment
Scooby Posted October 6, 2012 Share Posted October 6, 2012 Try this: local miniadminbase = createMarker(-1749, -3030, 53.6, 'cylinder', 1.5, 255, 0, 0, 150) function duty(element, matchingDimension) if getElementType(element) == "player" and matchingDimension then -- if the element is a player in the same dimension if not isPedInVehicle(element) then -- if the player is not in a vehicle setElementPosition (element, 0, 0, 5 ) -- move the player to coords end end end addEventHandler("onMarkerHit",miniadminbase,duty) Link to comment
joedajoester Posted October 6, 2012 Author Share Posted October 6, 2012 Thank you so much 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