هذا مو تاج
شيك ع هذا الموضوع اول
vehicleIDS = { 602, 545, 496, 517, 401 }
Vehicles = {}
VehicleM = createMarker ( -3231.28198,-3095.21338,5.00000, "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 ( math.random ( tonumber(vehicleIDS) ), x, y, z )
if Vehicles[hitElement] then
warpPedIntoVehicle( hitElement, Vehicles[hitElement] )
outputChatBox( "تم آخذ سيآرة", hitElement,255,0,255,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( "تم تلوين سيآرتك",255,0,255,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
)
جرب