Jump to content

طلب ماركر سيارات


7mod

Recommended Posts

-- Server Side !
Vehicles = {} 
  
VehicleM = createMarker ( x, y, z, "cylinder", 2, 255, 255, 0, 255 ) 
  
addEventHandler( "onMarkerHit", VehicleM, 
    function ( hitElement ) 
        if getElementType( hitElement ) == "player" then 
            if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then 
                destroyElement( Vehicles[hitElement] ) 
            end 
            local x,y,z = getElementPosition( hitElement ) 
            Vehicles[hitElement] = createVehicle ( ID, x, y, z ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
                outputChatBox( "* لقد حصلت علي موتر !", hitElement, 255, 0, 0, true ) 
            end 
        end 
    end 
) 
  
addEventHandler( "onVehicleExplode", root, 
    function( ) 
        setTimer( destroyElement, 2000, 1, source ) 
    end 
) 
  
addEventHandler( "onPlayerQuit", root, 
    function( ) 
        if Vehicles[source] then 
            destroyElement( Vehicles[source] ) 
        end 
    end 
) 

الإسستبدآل ,

السطر الثآلث ,

x, y, z = إحداثيات الماركر

السطر 12 ,

ID = رقم السيارة

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...