Jump to content

gui progress bar problem


xXMADEXx

Recommended Posts

For some reason, the progress bar will not load...

addEventHandler('onClientMarkerHit',root, 
    function (player) 
        if source == electritionPoleMarker then 
            if player == localPlayer then 
                if (getElementData(player,"Job")=="Electrician") then 
                    local width2,height2 = 555,59 
                    setTimer( 
                        guiCreateProgressBar(X,Y,width2,height2,false) 
                        , 60000, 1 
                    ) 
                    setPedAnimation(localPlayer, "BOMBER", "BOM_Plant", -1, true, false, false, false ) 
                    guiProgressBarSetProgress(repairProgressBar, 0) 
                    showCursor(true) 
                    progress1 = guiProgressBarGetProgress(repairProgressBar) 
                    guiProgressBarSetProgress(repairProgressBar, progress1 + 2) 
                    if (progress1 == 100) then 
                        setPedAnimation(localPlayer) 
                        destroyElement(t1) 
                        showCursor(false) 
                        destroyElement ( electritonPoleBlip ) 
                        destroyElement ( electritionPoleMarker ) 
                        destroyElement ( repairProgressBar ) 
                        triggerEvent('jobs:electrition:createPoles',localPlayer) 
                        triggerServerEvent("jobs:electrition:fixPole",localPlayer) 
                    else 
                        outputChatBox("Job-System: Sorry, your not an electrician.",255,0,0) 
                    end 
                end 
            end 
        end 
    end 
) 

Link to comment

Change:

                    setTimer( 
                        guiCreateProgressBar(X,Y,width2,height2,false) 
                        , 60000, 1 
                    ) 

To:

setTimer(guiCreateProgressBar, 60000, 1, X,Y,width2,height2,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...