Jump to content

DM Levels


Recommended Posts

Posted

Hi all,

How to make/already exists an resource with name Level of DM :

And when have : 100 points get level 1 , 200 points get level 2 , how to make please help me .

script:

 exports.scoreboard:addScoreboardColumn('Level') 

And how to continue ?

Posted

You can easily add a column to the scoreboard on a simple script:

-- script.lua:

exports [ "scoreboard" ]:scoreboardAddColumn ( "level" ) 

-- meta.xml:


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

This is not for zombie server, this is for any kind of server, the thing is, you gotta know how it works.

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

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 ) 

Omerta Roleplay

Posted

This is for [DM] Race Server? ... this is for "kills" ... i want for dm race server ... "hunter" .... now you know bro?

I have an resource "dmstats" and have Points column ...

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

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