Jump to content

Por que pasa esto?


Recommended Posts

Hola lo que pasa es que tengo unos teleports que llevan a una base al cielo pero si por ejemplo voy con una moto me caigo de arriba ps no aparezco en el piso y este es el script

Teleport1 = createMarker ( 807.5, 841.70001220703, 8.8000001907349, "corona", 10, 0, 0, 0, 0, getRootElement() ) 
Teleport2 = createMarker ( 674.73828125, 909.494140625, 791.348449707034, "corona", 10, 0, 255, 255, 255, getRootElement() ) 
Teleport3 = createMarker ( 720.93139648438, 919.96643066406, 772.42846679688, "corona", 5, 60, 255, 0, 255, getRootElement() ) 
  
function MarkerHit ( hitElement ) 
            local vehicle = getPedOccupiedVehicle ( hitElement ) 
            local skin = getPlayerSkin ( hitElement ) 
            if skin == 100 then 
            local teleportElement = ( vehicle and vehicle or hitElement ) 
            if ( source == Teleport1 ) then 
                setElementPosition ( teleportElement, 741.3369140625, 798.7236328125, 772.5 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
            elseif ( source == Teleport2 ) then 
                setElementPosition ( teleportElement, 631.3056640625, 833.025390625, 39.091259002686 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
            elseif ( source == Teleport3 ) then 
                setElementPosition ( teleportElement, 822.73046875, 909.7177734375, 13.3515625 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
            end 
            end 
        end 
addEventHandler ( "onMarkerHit", root, MarkerHit ) 

Link to comment
Teleport1 = createMarker ( 807.5, 841.70001220703, 8.8000001907349, "corona", 10, 0, 0, 0, 0, getRootElement() ) 
Teleport2 = createMarker ( 674.73828125, 909.494140625, 791.348449707034, "corona", 10, 0, 255, 255, 255, getRootElement() ) 
Teleport3 = createMarker ( 720.93139648438, 919.96643066406, 772.42846679688, "corona", 5, 60, 255, 0, 255, getRootElement() ) 
  
function MarkerHit ( hitElement ) 
    local vehicle = getPedOccupiedVehicle ( hitElement ) 
    local skin = getElementModel ( hitElement ) 
    if ( skin == 100 ) then 
        local teleportElement = ( vehicle and vehicle or hitElement ) 
        if ( source == Teleport1 ) then 
            setElementFrozen ( teleportElement, true ) 
            setElementPosition ( teleportElement, 741.3369140625, 798.7236328125, 772.5 ) 
            setElementRotation ( teleportElement, 0, 0, 0 ) 
            setElementFrozen ( teleportElement, false ) 
        elseif ( source == Teleport2 ) then 
            setElementFrozen ( teleportElement, true ) 
            setElementPosition ( teleportElement, 631.3056640625, 833.025390625, 39.091259002686 ) 
            setElementRotation ( teleportElement, 0, 0, 0 ) 
            setElementFrozen ( teleportElement, false ) 
        elseif ( source == Teleport3 ) then 
            setElementFrozen ( teleportElement, true ) 
            setElementPosition ( teleportElement, 822.73046875, 909.7177734375, 13.3515625 ) 
            setElementRotation ( teleportElement, 0, 0, 0 ) 
            setElementFrozen ( teleportElement, false ) 
        end 
    end 
end 
addEventHandler ( "onMarkerHit", root, MarkerHit ) 

Proba eso.

Link to comment
Teleport1 = createMarker ( 807.5, 841.70001220703, 8.8000001907349, "corona", 10, 0, 0, 0, 0, getRootElement() ) 
Teleport2 = createMarker ( 674.73828125, 909.494140625, 791.348449707034, "corona", 10, 0, 255, 255, 255, getRootElement() ) 
Teleport3 = createMarker ( 720.93139648438, 919.96643066406, 772.42846679688, "corona", 5, 60, 255, 0, 255, getRootElement() ) 
  
function MarkerHit ( hitElement ) 
    if ( getElementType ( hitElement ) == "player" ) then 
        local vehicle = getPedOccupiedVehicle ( hitElement ) 
        local skin = getElementModel ( hitElement ) 
        if ( skin == 100 ) then 
            local teleportElement = ( vehicle and vehicle or hitElement ) 
            if ( source == Teleport1 ) then 
                setElementFrozen ( teleportElement, true ) 
                setElementPosition ( teleportElement, 741.3369140625, 798.7236328125, 772.5 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
                setElementFrozen ( teleportElement, false ) 
            elseif ( source == Teleport2 ) then 
                setElementFrozen ( teleportElement, true ) 
                setElementPosition ( teleportElement, 631.3056640625, 833.025390625, 39.091259002686 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
                setElementFrozen ( teleportElement, false ) 
            elseif ( source == Teleport3 ) then 
                setElementFrozen ( teleportElement, true ) 
                setElementPosition ( teleportElement, 822.73046875, 909.7177734375, 13.3515625 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
                setElementFrozen ( teleportElement, false ) 
            end 
        end 
    end 
end 
addEventHandler ( "onMarkerHit", root, MarkerHit ) 

Link to comment

Si lo tiene:

           setElementFrozen ( teleportElement, true ) 
            setElementPosition ( teleportElement, 741.3369140625, 798.7236328125, 772.5 ) 
            setElementRotation ( teleportElement, 0, 0, 0 ) 
            setElementFrozen ( teleportElement, false ) 

Link to comment

Ps Mira yo tengo este script que es que uso

Teleport

Teleport1 = createMarker ( 807.5, 841.70001220703, 8.8000001907349, "corona", 10, 0, 0, 0, 0, getRootElement() ) 
Teleport2 = createMarker ( 674.73828125, 909.494140625, 791.348449707034, "corona", 10, 0, 255, 255, 255, getRootElement() ) 
Teleport3 = createMarker ( 720.93139648438, 919.96643066406, 772.42846679688, "corona", 5, 60, 255, 0, 255, getRootElement() ) 
  
function MarkerHit ( hitElement ) 
            local vehicle = getPedOccupiedVehicle ( hitElement ) 
            local skin = getPlayerSkin ( hitElement ) 
            if skin == 100 then 
            local teleportElement = ( vehicle and vehicle or hitElement ) 
            if ( source == Teleport1 ) then 
                setElementPosition ( teleportElement, 741.3369140625, 798.7236328125, 775.64025878906 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
            elseif ( source == Teleport2 ) then 
                setElementPosition ( teleportElement, 631.3056640625, 833.025390625, 39.091259002686 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
            elseif ( source == Teleport3 ) then 
                setElementPosition ( teleportElement, 822.73046875, 909.7177734375, 2.3515625 ) 
                setElementRotation ( teleportElement, 0, 0, 0 ) 
            end 
            end 
        end 
addEventHandler ( "onMarkerHit", root, MarkerHit ) 

pero lo que pasa se que si paso por ejemplo con una moto se me cae de la moto en el Teleport2 y hay veces en el 1

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...