Jump to content

تصحيح كود


Recommended Posts

Posted

ممكن كود يخلية يعيد الفنكشن ده

function pro() 
if ( source ==  play ) then 
guiSetVisible(window,false) 
showCursor(false) 
     x, y, z = unpack ( pickups [ math.random ( #pickups ) ] ) 
      markers = createMarker ( x, y, z, "cylinder", 2, 255, 255, 0, 255 ) 
        object = unpack ( pedCus [ math.random ( #pedCus ) ] ) 
        object1 = createObject( object, x, y, z )   
      blips = createBlipAttachedTo ( markers, 58 )  
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), pro ) 
  
    function MarkerHits () 
    if ( getElementModel (object1) == 1607 ) then 
     outputChatBox ( " n ") 
      
     destroyElement ( object1 ) 
     destroyElement ( markers ) 
     destroyElement ( blips ) 
  
    end 
        if ( getElementModel (object1) == 1604 ) then 
         outputChatBox ( "n1" ) 
      
     destroyElement ( object1 ) 
     destroyElement ( markers ) 
     destroyElement ( blips ) 
end 
end 
    addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHits ) 

Posted

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

function pro() 
if ( source ==  play ) then 
guiSetVisible(window,false) 
showCursor(false) 
 startJob ( thePlayer ) 
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), pro ) 
  
    function MarkerHits () 
    if ( getElementModel (object1) == 1607 ) then 
      
     destroyElement ( object1 ) 
     destroyElement ( markers ) 
     destroyElement ( blips ) 
  
    end 
        if ( getElementModel (object1) == 1604 ) then 
      
     destroyElement ( object1 ) 
     destroyElement ( markers ) 
     destroyElement ( blips ) 
end 
end 
    addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHits ) 
     
    function startJob ( thePlayer ) 
         x, y, z = unpack ( pickups [ math.random ( #pickups ) ] ) 
      markers = createMarker ( x, y, z, "cylinder", 2, 255, 255, 0, 255 ) 
        object = unpack ( pedCus [ math.random ( #pedCus ) ] ) 
        object1 = createObject( object, x, y, z )   
      blips = createBlipAttachedTo ( markers, 58 )  
end 

Posted

تم الحل :D

function pro() 
if ( source ==  play ) then 
guiSetVisible(window,false) 
showCursor(false) 
 startJob ( thePlayer ) 
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), pro ) 
  
    function MarkerHits () 
    if ( getElementModel (object1) == 1607 ) then 
      
     destroyElement ( object1 ) 
     destroyElement ( markers ) 
     destroyElement ( blips ) 
    startJob ( thePlayer ) 
    end 
        if ( getElementModel (object1) == 1604 ) then 
      
     destroyElement ( object1 ) 
     destroyElement ( markers ) 
     destroyElement ( blips ) 
     startJob ( thePlayer ) 
end 
end 
    addEventHandler ( "onClientMarkerHit", getRootElement(), MarkerHits ) 
     
    function startJob ( thePlayer ) 
         x, y, z = unpack ( pickups [ math.random ( #pickups ) ] ) 
      markers = createMarker ( x, y, z, "cylinder", 2, 255, 255, 0, 255 ) 
        object = unpack ( pedCus [ math.random ( #pedCus ) ] ) 
        object1 = createObject( object, x, y, z )   
      blips = createBlipAttachedTo ( markers, 58 )  
end 

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...