Vehicles = {}
VehicleM = createMarker ( 1834,874,11, "cylinder", 3, 155, 0, 0, 255 )
ColorM = createMarker ( 1835,894,11, "cylinder", 3, 0, 150, 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 ( 401, 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
)
outputChatBox ( "#FF0000للحصول على موتر اكتب في الشات سياره او سيارة #00FF00", getRootElement(), 255, 255, 255, true )
اتمنى تعديل الرساله الي تجي بشات ابي اخليها تجي كل 5 دقائق بشات وشكرا