Jump to content

help


golanu21

Recommended Posts

if ( killer and getElementType(killer) == "player" and  HOW I TYPE HERE ) then 
local progress = guiProgressBarGetProgress(bar) 
        guiProgressBarSetProgress(bar, progress +1) 
addEventHandler("onClientPedWasted", how i tYpe here, onWasted) 

i want, when i kill a zombie to give me progress +1

Link to comment

i make that

server side

    addEvent ( "onZombieWasted", true ) 
    addEventHandler ( "onZombieWasted", root, 
        function ( theKiller ) 
            exports.exp_system:addPlayerEXP ( theKiller, 1) 
            triggerClientEvent(theKiller, "gret", getRootElement())  
        end 
    ) 

client side

addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        fereastra = guiCreateWindow(1497, 317, 327, 67, "Experience", false) 
        guiWindowSetSizable(fereastra, false) 
  
        prog = guiCreateProgressBar(9, 16, 308, 41, false, fereastra)     
    end 
)   
function greetingHandler ( message ) 
    guiProgressBarSetProgress(progressBar, prog +1) 
end 
addEvent( "gret", true ) 
addEventHandler( "gret", getRootElement(), greetingHandler ) 
  
  

and when i kill a zombie :

client.lua:11 attempt to perform arhimetic on global "prog" (a userdata value) 

Link to comment
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        fereastra = guiCreateWindow(1497, 317, 327, 67, "Experience", false) 
        guiWindowSetSizable(fereastra, false) 
  
        progressBar = guiCreateProgressBar(9, 16, 308, 41, false, fereastra) 
    end 
) 
  
function greetingHandler ( ) 
    guiProgressBarSetProgress ( progressBar, ( guiProgressBarGetProgress ( progressBar ) + 1 ) ) 
end 
addEvent ( "gret", true ) 
addEventHandler ( "gret", getRootElement(), greetingHandler ) 

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