Jump to content

مساعده لو سمحتوآ


Recommended Posts

local marker = createMarker(1849.5064697266, 2793.0202636719, 56.899742126465, "checkpoint", 1, 0, 255, 0, 0) 
addEventHandler("onMarkerHit", marker,  
function (person) 
        x,y,z = getElementPosition( person ) 
    car = createVehicle ( 429, x, y, z ) 
            warpPedIntoVehicle(person,car) 
  
end 
  
)  

ابي ينزل سياره وحده بس من الماركر

و اذا ضغط انتر وفك السياره تختفي السياره

وشكرآ

Link to comment
-- لم يتم التجربة 
marker = createMarker ( 1849.50, 2793.02, 56.89, "checkpoint", 1.5, 0, 255, 0, 0 ) 
car = { } 
     
addEventHandler ( "onMarkerHit", marker, 
    function ( person ) 
        if getElementType ( person ) == "player" then 
            if car [person] then 
                destroyCar ( person ) 
            end 
            x, y, z = getElementPosition ( person ) 
            car [person] = createVehicle ( 429, x, y, z ) 
            warpPedIntoVehicle ( person, car [person] ) 
            addEventHandler ( "onVehicleExplode", car [person], removeCar ) 
            addEventHandler ( "onVehicleExit", car [person], removeCar )  
        end 
    end 
) 
  
addEventHandler ( "onPlayerQuit", root, 
    function ( ) 
        if car [source] then 
            destroyCar ( source ) 
        end 
    end 
) 
  
function removeCar ( ) 
    destroyElement ( source ) 
end 
  
function destroyCar ( person ) 
    destroyElement ( car[person] ) 
    car [person] = nil   
end 

Link to comment

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.
×
×
  • Create New...