iMr.3a[Z]eF Posted August 7, 2013 Posted August 7, 2013 Hello, i've created a tower for my server, I created a gate marker but, when a source hit the marker all player are teleported to the player in the marker and go inside the gate. It's client side (not full codes): addEventHandler ( "onClientMarkerHit", root, function ( ) if not isPedInVehicle ( localPlayer ) then if source == enter then setElementInterior ( localPlayer, 1 ) setElementPosition ( localPlayer, 2233.845703125, 1710.0625, 1011.0922851563 ) outputChatBox ( "* welcome to Drrb's Tower", 255, 255, 0 ) Also all markers exactly have problem like this.
csiguusz Posted August 7, 2013 Posted August 7, 2013 addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if hitElement == localPlayer and not isPedInVehicle ( localPlayer ) then -- the rest of your code wich I was too lazy to copy
TrapLord Studios™ Posted August 8, 2013 Posted August 8, 2013 So you'd like to create a gate for the tower? or a Teleport marker?
csiguusz Posted August 8, 2013 Posted August 8, 2013 No't working. It should work, if you put mine and your code well together and you don't have any other problems.
iMr.3a[Z]eF Posted August 8, 2013 Author Posted August 8, 2013 So you'd like to create a gate for the tower? or a Teleport marker? A teleport marker.
InVision Posted August 10, 2013 Posted August 10, 2013 addEventHandler ( "onClientMarkerHit", root, function ( ) if not isPedInVehicle ( localPlayer ) == 1 then if source == 1 then setElementInterior ( localPlayer, 1 ) setElementDimension ( localPlayer, 0 ) setElementPosition ( localPlayer, 2233.845703125, 1710.0625, 1011.0922851563 ) outputChatBox ( "* welcome to Drrb's Tower", 255, 255, 0 ) I've noticed you haven't set a dimension... setElementDimension ( localPlayer, 0 ) <-- Change the 0 value to whatever dimension you're TPing to
tosfera Posted August 10, 2013 Posted August 10, 2013 The fck InVision? O_O" if source == 1 then You should explain that to me... anyway try this; addEventHandler ( "onClientMarkerHit", root, function ( hitElement ) if ( isPedInVehicle ( getLocalPlayer() ) ) then return; end if not ( getElementType( hitElement ) == "player" ) then return; end -- just to be sure! if ( source == and hitElement == getLocalPlayer() ) then setElementInterior ( getLocalPlayer(), 1 ); setElementDimension ( getLocalPlayer(), 0 ); setElementPosition ( getLocalPlayer() , 2233.845703125, 1710.0625, 1011.0922851563 ); outputChatBox ( "* welcome to Drrb's Tower", 255, 255, 0 ) 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