GithubHelp home page GithubHelp logo

r-leveling-system's People

Contributors

roni-sl avatar

Stargazers

 avatar  avatar

Watchers

 avatar

r-leveling-system's Issues

fixes

Simple leveling system that can be used not only in darkrp

Features
Compatible with any gamemode
Compatible with addons that work with Vrondakis leveling system
Compatible with Job System | Job Employer NPCs
Has darkrp integration
Easy module system
Easily configurable
Compatible with MySQL(MySQLoo, tmysql4) or just sqlite
For devs
That hooks is available:

Serverside:
RLS.OnLevelChange(Player ply, number level): nothing to return
RLS.OnExpChange(Player ply, number exp, bool is_level_updated): nothing to return
RLS.UpdateExpAmount(Player ply, number exp): return number exp
Suggest your modules please
If you have ideas for a module or compatibility with an addon, just open Issue

ToDo
TTT support
Murder support

Problem to add exp in all the ways (time,kill,multiplyer....)

Lua Error:
[r-leveling-system-master] addons/r-leveling-system-master/lua/r_level_modules/time_exp.lua:12: attempt to call method 'AddExp' (a nil value)
1. unknown - addons/r-leveling-system-master/lua/r_level_modules/time_exp.lua:12
[r-leveling-system-master] addons/r-leveling-system-master/lua/r_level_modules/time_exp.lua:12: attempt to call method 'AddExp' (a nil value)
1. unknown - addons/r-leveling-system-master/lua/r_level_modules/time_exp.lua:12
Timer Failed! [RLS.time_exp:76561198969840992][@addons/r-leveling-system-master/lua/r_level_modules/time_exp.lua (line 10)]

Here is the lua error that appears in the console

Проблема работы хука

Привет. Привет. Как можно сделать так, чтобы награда выдавалась только при получении уровня?
Хук hook.Run("RLS.OnLevelChange", self, lvl) вызывается даже при повторном подключении к серверу и награду можно получать просто перезаходя на сервер.

hook.Add("RLS.OnLevelChange", "OnLevelChange", function(ply, lvl)
    if lvl == 2 then
        RLS:NotifyAll(ply, " получил 2 уровень!")
        ply:AddFrags(10)
    elseif lvl == 3 then
        RLS:NotifyAll(ply, " получил 3 уровень!")
        AddFrags(10)
    elseif lvl == 4 then
        RLS:NotifyAll(ply, " получил 4 уровень!")
        AddFrags(10)
    elseif lvl == 5 then
        RLS:NotifyAll(ply, " получил 5 уровень!")
        AddFrags(10)
    else
        print("RLS.OnLevelChange - Error")
    end

    if lvl >= 6 then
        ply:SetLevel(1)
    end
end)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.