Pro1KiLLeR Posted January 25, 2017 Share Posted January 25, 2017 الـسـلام علـيـكـم كـيـف الـحـال؟ هـذا كـود مـاركر يـعـطـيـك سـيـارة ! 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
^iiEcoo'x_) Posted January 25, 2017 Share Posted January 25, 2017 setTimer destroyElement Link to comment
N3xT Posted January 25, 2017 Share Posted January 25, 2017 وعليكم السلام ورحمة الله وبركاته 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
Pro1KiLLeR Posted January 26, 2017 Author Share Posted January 26, 2017 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 ) شـكـكـرأًًًًً سـوال if isElement( Vehicles[hitElement] ) then destroyElement( Vehicles[hitElement] ) end end, 300000, 0) 300000= كام دقيقة؟ Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now