اخوي اوسامه انا سويت كذا بس ماضبط يطلع الماركر بس مايعطيني لا موتر ولا شي
Vehicles = {}
Vehicle = createMarker ( 1490.6999511719, 1283.0999755859, 10.10000038147, "cylinder", 2, 255, 0, 0, 255 )
ColorM = createMarker ( 1474.6999511719, 1284.9000244141, 10.300000190735, "cylinder", 2, 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 ( 576, 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
)
ماادري وين الخطا ...