Jump to content

experience+skills[Help]


loniasiva

Recommended Posts

hello dudes can you help me to add skills/stats to this system For example if EXP get, >= 1000 and <=1999 the skill of AK47 get 500.?

function win(ammo, killer, weapon, bodypart) 
    if (killer and getElementType(killer) == "player" and killer ~= source) then 
        local H = getElementData(killer, "EXP") or 0 
        local S = getElementData(killer, "LV") or 0 
        local noob = getPlayerName(source) 
        local experience = 200 
        setElementData(killer, "EXP", tonumber(H)+experience) 
        local H = tonumber(H) + experience 
        triggerClientEvent(killer, "onTestExp", killer, experience) 
        if (tonumber(H) >= 0 and tonumber(H) <=999) then 
            setElementData(killer, "LV", 1) 
            setElementData(killer, "experience.rank", "1") 
        elseif (tonumber(H) >= 1000 and tonumber(H) <=1999) then 
            setElementData(killer, "LV", 2) 
        elseif (tonumber(H) >= 2000 and tonumber(H) <=2999) then 
            setElementData(killer, "LV", 3) 
        elseif (tonumber(H) >= 3000 and tonumber(H) <=3999) then 
            setElementData(killer, "LV", 4) 
  

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