Jump to content

Progress


3ssol

Recommended Posts

اخوي كنق
function ProgressHandler (  ) 
local LastProgress = guiProgressBarGetProgress ( GUIEditor.progressbar[1] ) 
    if LastProgress then 
        guiProgressBarSetProgress ( GUIEditor.progressbar[1],LastProgress+0.4 ) 
        guiSetVisible(GUIEditor.progressbar[1], true) 
        if LastProgress == 50 then 
            removeEventHandler ( 'onClientRender',root,ProgressHandler) 
            outputChatBox ( 'Done!' ) 
            guiSetVisible(GUIEditor.progressbar[1], false) 
        end 
    end 
end 
addEventHandler('onClientRender',root,ProgressHandler) 

ومموضااابط

فقط ابي اخفف سرعته

-- Client Side # 
function ProgressHandler ( ) 
    local LastProgress = guiProgressBarGetProgress ( GUIEditor.progressbar[1] ) 
    if ( LastProgress ) then 
        guiProgressBarSetProgress ( GUIEditor.progressbar[1], LastProgress + 0.2 ) 
        if ( LastProgress == 50 ) then 
            removeEventHandler ( 'onClientRender', root, ProgressHandler ) 
            outputChatBox ( 'Done!' ) 
            guiSetVisible ( GUIEditor.progressbar[1], false ) 
        end 
    end 
end 
addEventHandler ( 'onClientRender', root, ProgressHandler ) 

جرب كذا ، لو ماضبط معكـ ..

إستخدم

setTimer 
isTimer 
killTimer 

بدلاً من

Event: "onClientRender" 
removeEventHandler 

Link to comment

ي شباب ترا انا تعبت ابي حل

سويت كذا ومااضبط

شسالفه محد يعرفلها ؟

progressBar = guiCreateProgressBar(0.01, 0.42, 0.98, 0.38, true, fereastra) 
  
local progCount = 0 
 addCommandHandler("myExp", 
 function() 
 local me = guiProgressBarGetProgress (progressBar) 
 end 
) 
  
setTimer(function() 
 guiProgressBarSetProgress ( progressBar, ( guiProgressBarGetProgress ( progressBar ) + 1) ) 
 end,1500,0) 
local mu = guiProgressBarGetProgress (progressBar) 
    if mu >= 100 then 
        guiProgressBarSetProgress(progressBar, 0) 
        progCount = progCount+1 
        guiSetVisible (progressBar, false )  
    end 

Link to comment

جرب كذا

progressBar = guiCreateProgressBar(0.01, 0.42, 0.98, 0.38, true, fereastra) 
  
 addCommandHandler("myExp", 
 function() 
guiSetVisible(progressBar,true) 
setTimer(funcname,1500,0) 
 end 
) 
  
function funcname() 
local mu = guiProgressBarGetProgress (progressBar) 
    if mu >= 100 then 
        guiProgressBarSetProgress(progressBar, 0) 
        guiSetVisible (progressBar, false ) 
    end 
 guiProgressBarSetProgress ( progressBar, guiProgressBarGetProgress ( progressBar ) + 1) 
 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...