Jump to content

مشكلة


Recommended Posts

local blip2 = createBlip (1536.27, -1686.387, 13.546,5) 
  
addEventHandler( "onClientResourceStart", resourceRoot, function (  ) 
police = guiCreateLabel(50, 246, 191, 24, "CTF :- Capturing Criminal location", false) 
    progresscriminalcriminal = guiCreateProgressBar(44, 280, 207, 32, false)    
    markercriminal = createMarker (1536.27, -1686.387, 13.546,"cylinder", 2, 255, 255, 255, 255) 
    guiSetVisible ( progresscriminal, false ) 
    guiSetVisible ( criminal, false ) 
            guiSetFont(criminal, "default-bold-small") 
    guiLabelSetColor(criminal, 255, 0, 0) 
     setElementDimension ( markercriminal, 2 ) 
     criminal = guiCreateLabel(50, 246, 191, 24, "CTF :- Capturing Police location", false) 
    progresscriminalpolice = guiCreateProgressBar(44, 280, 207, 32, false)    
    markerpolice = createMarker (1536.27, -1686.387+5, 13.546,"cylinder", 2, 255, 255, 255, 255) 
    guiSetVisible ( progresscriminalp, false ) 
    guiSetVisible ( Police, false ) 
            guiSetFont(Police, "default-bold-small") 
    guiLabelSetColor(Police, 0, 0, 255) 
     setElementDimension ( markerpolice, 2 ) 
end ) 
  
addEventHandler ( "onClientMarkerHit", resourceRoot, function ( element ) 
  if ( source == markercriminal ) then 
    if ( element == getLocalPlayer (  ) and not getPedOccupiedVehicle ( element ) ) then 
      if ( getElementDimension ( element ) == 2 ) then 
       local Teams = getTeamFromName('criminal') 
           if (Teams) then 
           if ( getPlayersInTeam (Teams) )then 
            guiSetVisible ( criminal, true ) 
       guiSetVisible ( progresscriminal, true ) 
       guiProgressBarSetProgress ( progresscriminal, 0 ) 
       function updateProgress (  ) 
           guiProgressBarSetProgress ( progresscriminal, guiProgressBarGetProgress ( progresscriminal ) + 1 ) 
           if ( guiProgressBarGetProgress ( progresscriminal ) == 100 ) then 
            guiSetVisible ( progresscriminal, false ) 
                guiSetVisible ( criminal, false ) 
            outputChatBox ( "* CTF Completed" ) 
            triggerServerEvent("CtfP", localPlayer) 
            guiProgressBarSetProgress ( progresscriminal, 0 ) 
 if isTimer ( timer ) then killTimer ( timer ) 
 end 
        end   
    end 
      end 
timer = setTimer ( updateProgress, 50, 0)     
   end 
end 
       end 
       end 
end) 
  
       addEventHandler ( "onClientMarkerLeave", resourceRoot, function ( element ) 
  if ( source == markercriminal ) then 
    if ( element == getLocalPlayer (  ) and not getPedOccupiedVehicle ( element ) ) then 
       end    
           if isTimer ( timer ) then killTimer ( timer ) timer = nil 
                    guiProgressBarSetProgress ( progresscriminal, 0 ) 
                         guiSetVisible ( progresscriminal, false ) 
                            guiSetVisible ( criminal, false ) 
           end 
           end 
           end) 
            
            
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------           
  

يا شباب لو سمحتو سوولي الكود على تيم االشرطة يعني انا مسوي على تيم الحرامية انا ابي على تيم الشرطة كمان بس الماركر والبروجرس بار غير موجودات فوق يا شباب الي يقول تبي جاهز ومدري ايش والله اني جربت بس ما ضبط يعني نفس الكود بنفس المود بس لتيم ثاني والمركر غير موجود ات من فوق بالكود وشكرا

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