local Markers = { -- الماركرات
{-1663.51257, 1208.61926, 6.25465},
{-1649.62720, 1205.29102, 7.25000},
{-1632.57458, 1206.96558, 7.03906}
}
LimitBreaker = {}
for i, v in ipairs( Markers ) do
local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 )
LimitBreaker[marker] = true
end
addEventHandler( 'onClientMarkerHit', root,
function ( hitElement )
if LimitBreaker[source] then
if ( hitElement == Cplayer and getElementDimension( hitElement ) == 0 ) then
local x, y, z = getElementPosition( Cplayer )
if ( z <= 7.25465 ) then
guiGridListSetSelectedItem( list_buyplace, 0, 1 )
local Sel = guiGridListGetSelectedItem( list_buyplace )
if ( Sel == -1 ) then return end
local Data = guiGridListGetItemData( list_buyplace, Sel, 1 )
local x1, y1, z1, x2, y2, z2 = unpack( Data )
fadeCamera( false )
setTimer( fadeCamera, 1500, 1, true )
setTimer( setCameraMatrix, 1500, 1, x1, y1, z1, x2, y2, z2 )
if ( isElement( viewvehicle ) ) then if ( getElementModel( viewvehicle ) ) == guiGridListGetItemData( list_buyplace, Sel, 2 ) then return end destroyElement( viewvehicle ) end
triggerServerEvent( 'VehiclesSystem;createViewVehicle', hitElement, guiGridListGetItemData( list_buyplace, Sel, 2 ), x2, y2, z2, 'view' )
setTimer( guiSetVisible, 1500, 1, buyplace, not guiGetVisible( buyplace ) )
setTimer( showCursor, 1500, 1, not isCursorShowing( ) )
end
end
end
end, false
)
Cplayer مدري وش وضعها