Jump to content

progressbar


Recommended Posts

addEventHandler("onClientGUIClick",getRootElement(), 
    function ( ) 
if ( source == GUIEditor.button[4] ) then 
guiSetVisible (GUIEditor.progressbar[1], true) 
guiSetVisible (GUIEditor.gridlist[1], false) 
guiSetVisible (GUIEditor.gridlist[2], false) 
guiSetVisible (GUIEditor.gridlist[3], false) 
setTimer (  
    pro = guiProgressBarGetProgress(GUIEditor.progressbar[1]) 
     guiProgressBarSetProgress(GUIEditor.progressbar[1], 0) 
     if pro == 0 then 
         guiProgressBarSetProgress(GUIEditor.progressbar[1], +1) 
         , 5000, 1 ) 
         end 
         end 
         end 
         ) 
  
          
     

شلون اخلي البروجرس يتحرك الين ما يوصل 100؟ ويختفي

Link to comment

-- # Client Side : 
addEventHandler("onClientGUIClick",GUIEditor.button[4], 
function ( ) 
    guiSetVisible (GUIEditor.progressbar[1], true) 
    guiSetVisible (GUIEditor.gridlist[1], false) 
    guiSetVisible (GUIEditor.gridlist[2], false) 
    guiSetVisible (GUIEditor.gridlist[3], false) 
                  if isTimer ( Timer ) then return end 
        LoadProgress (  ) 
    end,false 
) 
  
  
function LoadProgress ( ) 
Timer = setTimer ( 
    function ( ) 
        if isElement ( GUIEditor.progressbar[1] ) then 
        local pro = guiProgressBarGetProgress(GUIEditor.progressbar[1]) 
         guiProgressBarSetProgress(GUIEditor.progressbar[1],pro+10) 
         if pro == 100 and isTimer ( Timer ) then 
            guiSetVisible ( GUIEditor.progressbar[1],false ) 
            killTimer ( Timer ) 
            end 
        end 
    end,1000,0) 
end 
Link to comment
addEventHandler("onClientGUIClick",GUIEditor.button[4], 
function ( ) 
    guiSetVisible (GUIEditor.progressbar[1], true) 
    guiSetVisible (GUIEditor.gridlist[1], false) 
    guiSetVisible (GUIEditor.gridlist[2], false) 
    guiSetVisible (GUIEditor.gridlist[3], false) 
      if not isPedInVehicle(source) then return outputChatBox("* يجب ان تكون في سيارهـ !",source,255,0,0) end 
          guiSetVisible (GUIEditor.progressbar[1], false) 
  
                  if isTimer ( Timer ) then return end 
        LoadProgress (  ) 
    end,false 
) 
  

ابي اذا اللاعب مو في سيارة ما يطلع الprogressbar

Link to comment

addEventHandler("onClientGUIClick",GUIEditor.button[4], 
function ( ) 
      if not isPedInVehicle(localPlayer) then return outputChatBox("* يجب ان تكون في سيارهـ !",255,0,0) end 
    guiSetVisible (GUIEditor.progressbar[1], true) 
    guiSetVisible (GUIEditor.gridlist[1], false) 
    guiSetVisible (GUIEditor.gridlist[2], false) 
    guiSetVisible (GUIEditor.gridlist[3], false) 
         if isTimer ( Timer ) then return end 
        LoadProgress (  ) 
    end,false 
) 
  
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...