Jump to content

Exp/Level System | SOLVED


Recommended Posts

Posted (edited)

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

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

What's the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I want a exp/level system that if player killed somebody he earn +5 exp and if he have 100exp he move to level 2

0 : level 1

100 : level 2

500 : level 3

1500 : level 4

3000 : level 5

4500 : level 6

Does it need client.lua

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

Posted

Help me please

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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