+Source|> Posted September 8, 2017 Share Posted September 8, 2017 حاولة فيها وما عرفتلها for i, v in ipairs( Markers ) do local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 ) end addEventHandler( 'onClientMarkerHit', resourceRoot, function( hitElement ) if hitElement == localPlayer 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', Cplayer, 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 ) اول كان ماركر واحد وشغال سويت جدول ماركرات ولوب ولما ادخل ماركر م يشتغل Link to comment
MR.StoRm Posted September 8, 2017 Share Posted September 8, 2017 2 minutes ago, Source|> said: حاولة فيها وما عرفتلها for i, v in ipairs( Markers ) do local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 ) end addEventHandler( 'onClientMarkerHit', resourceRoot, function( hitElement ) if hitElement == localPlayer 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', Cplayer, 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 ? ??? مو معرفه !! Link to comment
N3xT Posted September 8, 2017 Share Posted September 8, 2017 (edited) addEventHandler( 'onClientMarkerHit', root, function ( hitElement ) for i, v in ipairs( Markers ) do local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 ) if ( source == marker ) then if ( hitElement == localPlayer and getElementDimension( hitElement ) == 0 ) then local x, y, z = getElementPosition( hitElement ) 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 end, false ) ما أتوقع الكود اللي فوق بيشتغل معك لأنك لازم تضيفه بحدث تشغيل السكربت عشان يسوي لوب للجدول عالعموم جربه وشوف Edited September 8, 2017 by N3xT Link to comment
+Source|> Posted September 8, 2017 Author Share Posted September 8, 2017 14 minutes ago, N3xT said: addEventHandler( 'onClientMarkerHit', root, function ( hitElement ) for i, v in ipairs( Markers ) do local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 ) if ( source == marker ) then if ( hitElement == localPlayer and getElementDimension( hitElement ) == 0 ) then local x, y, z = getElementPosition( hitElement ) 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 end, false ) ما أتوقع الكود اللي فوق بيشتغل معك لأنك لازم تضيفه بحدث تشغيل السكربت عشان يسوي لوب للجدول عالعموم جربه وشوف لا ما ظبطت 20 minutes ago, MR.StoRm said: وش تبي تسوي ؟ , + Cplayer ? ??? مو معرفه !! اول كانت شغاله تمام لما اضفت جدول ولوب ما اشتغلت Link to comment
MR.StoRm Posted September 8, 2017 Share Posted September 8, 2017 2 minutes ago, Source|> said: لا ما ظبطت اول كانت شغاله تمام لما اضفت جدول ولوب ما اشتغلت ورينا الجدول Link to comment
+Source|> Posted September 8, 2017 Author Share Posted September 8, 2017 Just now, MR.StoRm said: ورينا الجدول local Markers = { {-1663.51257, 1208.61926, 6.25465}, {-1649.62720, 1205.29102, 7.25000}, {-1632.57458, 1206.96558, 7.03906}, } local Markers = { -- الماركرات {-1663.51257, 1208.61926, 6.25465}, {-1649.62720, 1205.29102, 7.25000}, {-1632.57458, 1206.96558, 7.03906}, } for i, v in ipairs( Markers ) do local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 ) end addEventHandler( 'onClientMarkerHit', root, function ( hitElement ) if ( source == marker ) 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 ) Link to comment
MR.StoRm Posted September 8, 2017 Share Posted September 8, 2017 11 minutes ago, Source|> said: local Markers = { {-1663.51257, 1208.61926, 6.25465}, {-1649.62720, 1205.29102, 7.25000}, {-1632.57458, 1206.96558, 7.03906}, } local Markers = { -- الماركرات {-1663.51257, 1208.61926, 6.25465}, {-1649.62720, 1205.29102, 7.25000}, {-1632.57458, 1206.96558, 7.03906}, } for i, v in ipairs( Markers ) do local marker = createMarker( v[1], v[2], v[3], "cylinder", 1.2, 200, 150, 50 ) end addEventHandler( 'onClientMarkerHit', root, function ( hitElement ) if ( source == marker ) 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 ) دي بق يقول شي ء؟ Link to comment
+Source|> Posted September 8, 2017 Author Share Posted September 8, 2017 19 minutes ago, MR.StoRm said: دي بق يقول شي ء؟ لاا Link to comment
MR.StoRm Posted September 8, 2017 Share Posted September 8, 2017 1 minute ago, Source|> said: لاا جرب : local Markers = { {-1663.51257, 1208.61926, 6.25465}, {-1649.62720, 1205.29102, 7.25000}, {-1632.57458, 1206.96558, 7.03906} } Link to comment
+Source|> Posted September 8, 2017 Author Share Posted September 8, 2017 31 minutes ago, MR.StoRm said: جرب : local Markers = { {-1663.51257, 1208.61926, 6.25465}, {-1649.62720, 1205.29102, 7.25000}, {-1632.57458, 1206.96558, 7.03906} } ما صار شي Link to comment
#BrosS Posted September 8, 2017 Share Posted September 8, 2017 (edited) 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 مدري وش وضعها Edited September 8, 2017 by #BrosS Link to comment
+Source|> Posted September 8, 2017 Author Share Posted September 8, 2017 40 minutes ago, #BrosS said: 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 مدري وش وضعها والله كانت شغاله بماركر واحد Link to comment
MR.StoRm Posted September 8, 2017 Share Posted September 8, 2017 1 hour ago, Source|> said: والله كانت شغاله بماركر واحد تبي تسوي 3 ماركرات ؟ Link to comment
#Soking Posted September 8, 2017 Share Posted September 8, 2017 من وجهة نظري ان انت تجرب كود من اكواد الاخوه الفوق مع ازاله end, false ) و تصير end ) Link to comment
+Source|> Posted September 8, 2017 Author Share Posted September 8, 2017 5 hours ago, #Soking said: من وجهة نظري ان انت تجرب كود من اكواد الاخوه الفوق مع ازاله end, false ) و تصير end ) نفعت يعطيك العافيه Link to comment
#Soking Posted September 8, 2017 Share Posted September 8, 2017 17 minutes ago, Source|> said: نفعت يعطيك العافيه حياك الله 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