Jump to content

getElementData problem


William147

Recommended Posts

Hello!

I would like to call killer's element data and killed player's element data but it isn't works!

What is the problem?

  
function call(killer) 
    local killername = getPlayerName ( killer ) 
    local sourcename = getPlayerName ( source ) 
    local killergroup = getElementData(killer,"NameGroup") 
    local killedgroup =  getElementData ( source, "NameGroup" ) 
    if killer then 
        outputChatBox(killername.."'s group: "..tostring(killergroup).." "..sourcename.."'s group:"..tostring(killedgroup)) 
    end 
end 
addEventHandler("kilLDayZPlayer", getRootElement(), call) 
  

Link to comment

Stop over-writing MTA's main functions.

  
  
function cal(killer) 
    local killername = getPlayerName ( killer ) 
    local sourcename = getPlayerName ( source ) 
    local killergroup = getElementData(killer,"NameGroup") 
    local killedgroup =  getElementData ( source, "NameGroup" ) 
    if killer then 
        outputChatBox(killername.."'s group: "..tostring(killergroup).." "..sourcename.."'s group:"..tostring(killedgroup)) 
    end 
end 
addEvent("kilLDayZPlayer", true) 
addEventHandler("kilLDayZPlayer", getRootElement(), cal) 
  

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