Ekko Posted October 27, 2018 Posted October 27, 2018 Hello i added interior map in my server i used this code for teleportation but players cant see each other inside the interior pls help local marker1 = createMarker(2219.662109375, -1155.7900390625, 1026.6960449219, "arrow", 2, 90,255,255,255) --mx, my, mz = teleport's position, SIZE = teleport's size for example 2 (not 255 xd), R,G,B,A = teleport's color for example 255,0,0,255 = red or 0,0,0,0 = invisible. function teleport1(player, matchingDimension) if player == localPlayer then setElementInterior (player, 10, -978.90002441406,1053,1344.3000488281 ) --x,y,z = coordinates where a player will be teleported setElementDimension (player, 40 ) --OPTIONAL setPedRotation (player, 90) --rz = Z rotation of the ped --OPTIONAL setElementFrozen(player, true) setTimer(setElementFrozen, 2000, 1, player, false) --TIME = for how long the ped should be frozen after being teleported 1000 = 1sec end end addEventHandler("onClientMarkerHit", marker1, teleport1)
Dimos7 Posted October 27, 2018 Posted October 27, 2018 I think you need be on server side for that to work
Tommy. Posted October 27, 2018 Posted October 27, 2018 Try this [server-side] local marker1 = createMarker(2219.662109375, -1155.7900390625, 1026.6960449219, "arrow", 2, 90,255,255,255) function teleport1(source) setElementInterior (source, 10, -978.90002441406,1053,1344.3000488281 ) setElementDimension (source, 40 ) end addEventHandler("onMarkerHit", marker1, teleport1) I did not test
Dimos7 Posted October 27, 2018 Posted October 27, 2018 local marker1 = createMarker(2219.662109375, -1155.7900390625, 1026.6960449219, "arrow", 2, 90,255,255,255) function teleport1(hitPlayer) if isElement(hitPlayer) and getElementType (hitPlayer) == "player" then setElementInterior (hitPlayer , 10, -978.90002441406,1053,1344.3000488281 ) setElementDimension (hitPlayer, 40 ) end end addEventHandler("onMarkerHit", marker1, teleport1) Source of that event is marker try this
Moony Posted February 29, 2020 Posted February 29, 2020 On 27/10/2018 at 20:39, Dimos7 said: local marker1 = createMarker(2219.662109375, -1155.7900390625, 1026.6960449219, "arrow", 2, 90,255,255,255) function teleport1(hitPlayer) if isElement(hitPlayer) and getElementType (hitPlayer) == "player" then setElementInterior (hitPlayer , 10, -978.90002441406,1053,1344.3000488281 ) setElementDimension (hitPlayer, 40 ) end end addEventHandler("onMarkerHit", marker1, teleport1) Source of that event is marker try this Any chance for this script to be updated/tested? I'm struggling with the same issue. Already have tried this script, but it doesn't work. Oddly, it teleports me to an emtpy interior (everything, including me, invisible) only when I'm on a vehicle.
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