Jump to content

DM Levels


Recommended Posts

use this

    exports.scoreboard:addScoreboardColumn('Level') 
    local levelplayer = getElementData(player,"level") or 0 
  
    function levelboard ( ) 
        for index, player in ipairs ( getElementsByType "player" ) do  
            setElementData ( player, "Level", levelplayer )  
        end  
     end  
    setTimer ( levelboard, 500, 0 ) 
  
    function giveexp ( ammo, killer, killerweapon, bodypart ) 
        if ( killer ) and ( killer ~= source ) then 
             exports.exp_system:addPlayerEXP ( killer, 5 ) 
        end 
    end 
    addEventHandler ( "onPlayerWasted", getRootElement(), giveexp ) 

Link to comment
use this
    exports.scoreboard:addScoreboardColumn('Level') 
    local levelplayer = getElementData(player,"level") or 0 
  
    function levelboard ( ) 
        for index, player in ipairs ( getElementsByType "player" ) do  
            setElementData ( player, "Level", levelplayer )  
        end  
     end  
    setTimer ( levelboard, 500, 0 ) 
  
    function giveexp ( ammo, killer, killerweapon, bodypart ) 
        if ( killer ) and ( killer ~= source ) then 
             exports.exp_system:addPlayerEXP ( killer, 5 ) 
        end 
    end 
    addEventHandler ( "onPlayerWasted", getRootElement(), giveexp ) 

What is the element data update for? it's not even right.

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