ViRuZGamiing Posted June 1, 2013 Share Posted June 1, 2013 Hello, I made this for a friend: local myMarker = createMarker(2579.3999023438, -1894, 3.9000000953674, 'cylinder', 4.0, 0, 0, 255, 150) function MarkerHit( hitElement, matchingDimension ) spawnPlayer(hitElement, 2574.1999511719, -1784.3000488281, 1.6000000238419) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) He want that a car comes in the car also moves to the location Link to comment
iPrestege Posted June 1, 2013 Share Posted June 1, 2013 -- # Server Side : local myMarker = createMarker(2579.3999023438, -1894, 3.9000000953674, 'cylinder', 4.0, 0, 0, 255, 150) function MarkerHit( hitElement, matchingDimension ) if getElementType ( hitElement ) == 'player' then local vehicle = getPedOccupiedVehicle( hitElement ) if vehicle then setElementPosition ( vehicle,2574.1999511719, -1784.3000488281, 1.6000000238419 ) else setElementPosition ( hitElement,2574.1999511719, -1784.3000488281, 1.6000000238419 ) end end end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) Link to comment
Castillo Posted June 1, 2013 Share Posted June 1, 2013 local myMarker = createMarker ( 2579.3999023438, -1894, 3.9000000953674, 'cylinder', 4.0, 0, 0, 255, 150 ) function MarkerHit ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == 'player' ) then local teleElement = ( isPedInVehicle ( hitElement ) and getPedOccupiedVehicle ( hitElement ) or hitElement ) setElementPosition ( teleElement, 2574.1999511719, -1784.3000488281, 1.6000000238419 ) end end addEventHandler ( "onMarkerHit", myMarker, MarkerHit ) That's an easier way to do it. 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