Jump to content

تصحيح فنكشن ..


Recommended Posts

السلام عليكم ورحمة الله وبركاته

بغيت اجرب اللوب بطريقه سهله وسويت الفنكشن ذا , الله لايهينكم عدلو لي الاخطاء ووضحو اللي صاير :D

marker = createMarker ( 1807.15369, 880.89752, 10.08928, "cylinder",  4.0, 0, 0, 255, 255 ) 
  
function ahmad() 
if ( source == marker ) then 
for k,v in ipairs do 
    destroyElement(v) 
  
end 
    end 
        end 
addEventHandler ( "onClientMarkerHit", getRootElement(), ahmad ) 

احسبه خبيصه :mrgreen:

Link to comment

هذا لوب ماركات

ListMarkers = { 
    { x,y,z } 
    -- { x,y,z } 
} 
  
for i, type in ipairs ( ListMarkers ) do 
    local Markers = createMarker ( type[1],type[2],type[3],'cylinder',4, 255,0,0 , 170 ) 
    addEventHandler ( 'onClientMarkerHit', Markers, Hit ) 
    addEventHandler ( 'onClientMarkerLeave', Markers,Leave ) 
end 
  
function Hit (  ) 
    -- you code 
end 
  
function Leave (  ) 
    -- you code 
end 
Link to comment
فيه اخطاء

ليش مسوي لوب ومو محدد الهدف منه ؟

ايش تبي تسوي بالضبط انت ؟

لي فتره م سويت ولا فنكشن بس اقرا فالمنتدى , وقلت خلني اجرب اللوب دامني توي جديد عليه وكذا

وبس لا اكثر ولا اقل .. :mrgreen:

Link to comment
هذا لوب ماركات

ListMarkers = { 
    { x,y,z } 
    -- { x,y,z } 
} 
  
for i, type in ipairs ( ListMarkers ) do 
    local Markers = createMarker ( type[1],type[2],type[3],'cylinder',4, 255,0,0 , 170 ) 
    addEventHandler ( 'onClientMarkerHit', Markers, Hit ) 
    addEventHandler ( 'onClientMarkerLeave', Markers,Leave ) 
end 
  
function Hit (  ) 
    -- you code 
end 
  
function Leave (  ) 
    -- you code 
end 

آسف تعبتك معي لأن انحلت المشكله وجيت بحذف الموضوع م لقيته :lol:

يغلق !

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...