Jump to content

onPlayerWasted


Recommended Posts

Posted

I'm building a UCP and I've some problems with this event handler that I never used before: onPlayerWasted

I have this simple function:

  
    function saveLifeStats() 
        local whoDied = getPlayerName(source) 
        outputChatBox("Ai murit cand aveai "..getElementData(whoDied, "lifetime"), whoDied, 255, 0, 0, false) 
    end 
    addEventHandler("onPlayerWasted", getRootElement(), saveLifeStats) 

The problem is I get this error when a player dies:

Attempt to concatenate a boolean value.

Posted
function saveLifeStats() 
outputChatBox("Ai murit cand aveai "..getElementData(source, "lifetime"), source, 255, 0, 0, false) 
end 
addEventHandler("onPlayerWasted", getRootElement(), saveLifeStats) 

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