jdcu Posted May 12, 2017 Share Posted May 12, 2017 local groupName = 'ArmyElite' markerDoor = createMarker( -85.9716796875, 1036.521484375, 18.616687774658,"cylinder",2, 0, 255, 0, 150) markerDoor2 = createMarker( -69.2978515625, -3365.498046875, 23.388263702393,"cylinder",2, 0, 255, 0, 150) --entrada addEventHandler ( "onMarkerHit", root, function ( hPlayer ) local vehicle = getPedOccupiedVehicle ( hPlayer ) if ( source == markerDoor ) then if ( getElementData ( hPlayer, "gang" ) == "ArmyElite" ) then --outputChatBox( "Bienvenido", source, 0, 255, 0, true ) setElementPosition ( hPlayer , -89.0361328125, -3382.576171875, 24.388263702393 ) setElementPosition ( vehicle , -89.0361328125, -3382.576171875, 24.388263702393 ) else outputChatBox( 'ALERTA! Base Privada '..groupName..' !', hPlayer, 255, 0, 255 ) end end end ) --salida addEventHandler ( "onMarkerHit", root, function ( hPlayer2 ) local vehicle2 = getPedOccupiedVehicle ( hPlayer2 ) if ( source == markerDoor2 ) then if ( getElementData ( hPlayer2, "gang" ) == "ArmyElite" ) then setElementPosition ( hPlayer2 , -73.763671875, 1037.0205078125, 19.691812515259 ) setElementPosition ( vehicle2 , -73.763671875, 1037.0205078125, 19.691812515259 ) --outputChatBox( "Saliendo de la base", source, 0, 255, 0, true ) else outputChatBox( 'ALERTA! Base Privada '..groupName..' !', hPlayer2, 255, 0, 255 ) end end end ) Buenas ocupo ayuda, quisiera que el marker Funcione con PASS y no que al pararte se tp a la base, si alguien puede ayudarme por favor Link to comment
#Dv^ Posted May 12, 2017 Share Posted May 12, 2017 local groupName = 'ArmyElite' markerDoor = createMarker( -85.9716796875, 1036.521484375, 18.616687774658,"cylinder",2, 0, 255, 0, 150) addCommandHandler ( "pass_1", function ( hPlayer) if isElementWithinMarker(hPlayer, markerDoor) then local vehicle = getPedOccupiedVehicle ( hPlayer ) if ( getElementData ( hPlayer, "gang" ) == "ArmyElite" ) then --outputChatBox( "Bienvenido", source, 0, 255, 0, true ) setElementPosition ( hPlayer , -89.0361328125, -3382.576171875, 24.388263702393 ) setElementPosition ( vehicle , -89.0361328125, -3382.576171875, 24.388263702393 ) else outputChatBox( 'ALERTA! Base Privada '..groupName..' !', hPlayer, 255, 0, 255 ) end end end ) 1 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