jdcu

Marker Para clan Ayuda

Recommended Posts


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

Share this post


Link to post
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
)

 

  • Like 1

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.