Cocodrilo Posted May 31, 2013 Share Posted May 31, 2013 What is wrong? addEventHandler("onPlayerWasted", getRootElement(), function (killer) local message if killer then if killer ~= source then local killerType = getElementType(killer) if killerType == "player" then message = getPlayerName(killer).." mató a "..getPlayerName(source).."." givePlayerMoney ( killer, 10000 ) outputChatBox(message) end end end end ) Link to comment
Vision Posted May 31, 2013 Share Posted May 31, 2013 The first argument is totalAmmo not killer. addEventHandler ( "onPlayerWasted", root, function ( _, killer ) local message if ( killer ) then if ( killer ~= source ) then local killerType = getElementType ( killer ) if ( killerType == "player" ) then message = getPlayerName ( killer ) .. " mató a " .. getPlayerName ( source ) .. "." givePlayerMoney ( killer, 10000 ) outputChatBox ( message ) end end end end ) Link to comment
Cocodrilo Posted May 31, 2013 Author Share Posted May 31, 2013 The first argument is totalAmmo not killer. addEventHandler ( "onPlayerWasted", root, function ( _, killer ) local message if ( killer ) then if ( killer ~= source ) then local killerType = getElementType ( killer ) if ( killerType == "player" ) then message = getPlayerName ( killer ) .. " mató a " .. getPlayerName ( source ) .. "." givePlayerMoney ( killer, 10000 ) outputChatBox ( message ) end end end end haha thank you -- s:) --> ) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now