Jump to content

Help in EXP/Level System


^Dev-PoinT^

Recommended Posts

Posted
function [color=#FF0000]win[/color](ammo, killer, weapon, bodypart) 
addEventHandler( "onPlayerWasted", getRootElement(), [color=#FF0000]Win[/color]) 

CiTLh.png
Posted
even this has a name like me

my name is win

and his name is Player_Wasted

so what is worng??

function [color=#FF0000][size=8][b]w[/b][/size][/color]in(ammo, killer, weapon, bodypart) 
addEventHandler( "onPlayerWasted", getRootElement(), [color=#FF0000][b][size=8]W[/size][/b][/color]in) 

ING : [xXx]~Al3grab

Posted
exports.scoreboard:scoreboardAddColumn("EXP") 
exports.scoreboard:scoreboardAddColumn("Level") 
  
function win(ammo, killer, weapon, bodypart) 
    local H = getElementData(killer, "EXP") 
    local S = getElementData(killer, "Level") 
    local killer1 = getPlayerName(killer) 
    local noob = getPlayerName(source) 
    if killer and killer ~=source then 
    setElementData(killer, "EXP", tonumber(H)+1) 
    if tonumber(H) == 10 then 
    setElementData(killer, "Level", "Lvl 1") 
    elseif tonumber(H) == 20 then 
    setElementData(killer, "Level", "Lvl 2") 
    elseif tonumber(H) == 30 then 
    setElementData(killer, "Level", "Lvl 3") 
    elseif tonumber(H) == 40 then 
    setElementData(killer, "Level", "Lvl 4") 
    elseif tonumber(H) == 50 then 
    setElementData(killer, "Level", "Lvl 5") 
    elseif tonumber(H) == 60 then 
    setElementData(killer, "Level", "Lvl 6") 
    end 
    outputChatBox(killer1 .. "Killed " .. noob .. " and gained +1 EXP", getRootElement(), 255, 255, 0, false) 
    end 
end 
addEventHandler( "onPlayerWasted", getRootElement(), win) 

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

You had put "Win" (UPPER CASE 'W') in the EVENT HANDLER, and in the function you put win (LOWER CASE 'w').

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

You really should try to learn more english, because many people has explained your error many times and you didn't understood them.

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.

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