Jump to content

Exp/Level System | SOLVED


Recommended Posts

Hi, can someone see what wrong here ?

server.lua

exports.scoreboard:scoreboardAddColumn("EXP") 
  
function win(ammo, killer, weapon, bodypart) 
    local H = getElementData(killer, "EXP") 
    local killer1 = getPlayerName(killer) 
    local noob = getPlayerName(source) 
    if killer and killer ~=source then 
    if tonumber(H) < 10 then 
         setElementData(killer, "EXP", tonumber(H)+1) 
    end 
    outputChatBox(killer1 .. "Killed " .. noob .. " and gained +1 EXP", getRootElement(), 255, 255, 0, false) 
    end 
end 
addEventHandler("onPlayerWasted", getRootElement(), Win) 

Thanks for help !

Edited by Guest
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...