Jump to content

كود الوقت !! تعديل علي وقت


Recommended Posts

الـسـلام علـيـكـم
كـيـف الـحـال؟

هـذا كـود مـاركر يـعـطـيـك سـيـارة !


 

Vehicles = {}
 
VehicleM = createMarker ( 1834,874,11, "cylinder", 3, 255, 0, 0, 255 )
ColorM = createMarker ( 1835,894,11, "cylinder", 3, 0, 255, 0, 255 )
 
addEventHandler( "onMarkerHit", root,
    function ( hitElement )
        if source == VehicleM and 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 ( 507, x, y, z )
            if Vehicles[hitElement] then
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] )
                outputChatBox( "تم أعطائك سيارتك بنجاح :)", hitElement, 255, 0, 0, true )
            end
        elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then
            local player = getPedOccupiedVehicle( hitElement )
            setVehicleColor( player, math.random(255), math.random(255), math.random(255) )
            outputChatBox( "تم تلوين سيارتك بنجاح :)", hitElement, 0, 255, 0, true )
        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
)



تدخل الماركر =تاخذ سيارة!
اريد اضيف وقت!!
تدخل الماركر = تاخذ سيارة,,لمدة 5 دقاق
وبعد لـ5دقائق تنسحب السيارة من الشخص الذي دخل الماركر!!

شـكـرأ

Link to comment

وعليكم السلام ورحمة الله وبركاته

Vehicles = {}
 
VehicleM = createMarker ( 1834,874,11, "cylinder", 3, 255, 0, 0, 255 )
ColorM = createMarker ( 1835,894,11, "cylinder", 3, 0, 255, 0, 255 )
 
addEventHandler( "onMarkerHit", root,
    function ( hitElement )
        if source == VehicleM and 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 ( 507, x, y, z )
            if Vehicles[hitElement] then
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] )
                outputChatBox( "تم أعطائك سيارتك بنجاح :)", hitElement, 255, 0, 0, true )
				setTimer(
				function()
					if isElement( Vehicles[hitElement] ) then destroyElement( Vehicles[hitElement] ) end
				end, 300000, 0)
            end
        elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then
            local player = getPedOccupiedVehicle( hitElement )
            setVehicleColor( player, math.random(255), math.random(255), math.random(255) )
            outputChatBox( "تم تلوين سيارتك بنجاح :)", hitElement, 0, 255, 0, true )
        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
)

 

Link to comment
1 hour ago, N3xT said:

وعليكم السلام ورحمة الله وبركاته


Vehicles = {}
 
VehicleM = createMarker ( 1834,874,11, "cylinder", 3, 255, 0, 0, 255 )
ColorM = createMarker ( 1835,894,11, "cylinder", 3, 0, 255, 0, 255 )
 
addEventHandler( "onMarkerHit", root,
    function ( hitElement )
        if source == VehicleM and 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 ( 507, x, y, z )
            if Vehicles[hitElement] then
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] )
                outputChatBox( "تم أعطائك سيارتك بنجاح :)", hitElement, 255, 0, 0, true )
				setTimer(
				function()
					if isElement( Vehicles[hitElement] ) then destroyElement( Vehicles[hitElement] ) end
				end, 300000, 0)
            end
        elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then
            local player = getPedOccupiedVehicle( hitElement )
            setVehicleColor( player, math.random(255), math.random(255), math.random(255) )
            outputChatBox( "تم تلوين سيارتك بنجاح :)", hitElement, 0, 255, 0, true )
        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
)

 

 

1 hour ago, N3xT said:

وعليكم السلام ورحمة الله وبركاته


Vehicles = {}
 
VehicleM = createMarker ( 1834,874,11, "cylinder", 3, 255, 0, 0, 255 )
ColorM = createMarker ( 1835,894,11, "cylinder", 3, 0, 255, 0, 255 )
 
addEventHandler( "onMarkerHit", root,
    function ( hitElement )
        if source == VehicleM and 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 ( 507, x, y, z )
            if Vehicles[hitElement] then
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] )
                outputChatBox( "تم أعطائك سيارتك بنجاح :)", hitElement, 255, 0, 0, true )
				setTimer(
				function()
					if isElement( Vehicles[hitElement] ) then destroyElement( Vehicles[hitElement] ) end
				end, 300000, 0)
            end
        elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then
            local player = getPedOccupiedVehicle( hitElement )
            setVehicleColor( player, math.random(255), math.random(255), math.random(255) )
            outputChatBox( "تم تلوين سيارتك بنجاح :)", hitElement, 0, 255, 0, true )
        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:x

سـوال

if isElement( Vehicles[hitElement] ) then destroyElement( Vehicles[hitElement] ) end

end, 300000, 0)

300000= كام دقيقة؟

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