Git Product home page Git Product logo

leveling-system's Introduction

leveling-system's People

Contributors

amd-nick avatar arizard avatar blueberryy avatar chesiren avatar crap-head avatar essgeeeich avatar modcrafts avatar ryanm2711 avatar uavxp avatar uen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leveling-system's Issues

Job level falire? PLEASE HELP!!

I put the "level" command in my job. (Here it is:)
capture

And then a lua error appears saying that my line was supposed to be closed before the "category" on line 36.

PLEASE HELP, IT WILL BE APPRECIATED!

Linux not working Mysql

gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua:264: Lost connection t o MySQL server during query (SELECT level,xp FROM darkrp_levels WHERE uid =
"4005534345";)

It always writes and does not use data recorded in mysql, linux debian 7. Used the latest darkrp

Custom Checks

Currently I am trying to make a custom check to see if the player is a certain level, and if they are they can use that entity (not spawn it, interact with it)

I've tried it with ply:hasLevel ply:getLevel Level = , (With different capitalization)

Doesnt work with that, the entity with that, doesnt show up.

I am doing it with

if (custom check for level/plain level) then

(entity)

end

the xp gain thing is broken

I used the workshop version and got this error

[ERROR] A runtime error has occurred in "lua/darkrp_modules/levels/sv_data.lua" on line 28.
The best help I can give you is this:

Warning! DarkRPVar 'xp' wasn't registered!
Please contact the author of the DarkRP Addon to fix this.
Until this is fixed you don't need to worry about anything. Everything will keep working.
It's just that registering DarkRPVars would make DarkRP faster.

Hints:
- No hints, sorry.

The responsibility for this error lies with (the authors of) one (or more) of these files:
1. lua/darkrp_modules/levels/sv_data.lua on line 28
2. lua/darkrp_modules/levels/sv_data.lua on line 14
3. gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua on line 300
4. lua/darkrp_modules/levels/sv_data.lua on line 14
5. lua/darkrp_modules/levels/sv_data.lua on line 23
6. lua/darkrp_modules/levels/sh_core.lua on line 200
7. addons/ulib/lua/ulib/shared/hook.lua on line 179
------- End of Simplerr error -------

[ERROR] A runtime error has occurred in "lua/darkrp_modules/levels/sv_data.lua" on line 29.
The best help I can give you is this:

Warning! DarkRPVar 'level' wasn't registered!
Please contact the author of the DarkRP Addon to fix this.
Until this is fixed you don't need to worry about anything. Everything will keep working.
It's just that registering DarkRPVars would make DarkRP faster.

Hints:
- No hints, sorry.

The responsibility for this error lies with (the authors of) one (or more) of these files:
1. lua/darkrp_modules/levels/sv_data.lua on line 29
2. lua/darkrp_modules/levels/sv_data.lua on line 14
3. gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua on line 300
4. lua/darkrp_modules/levels/sv_data.lua on line 14
5. lua/darkrp_modules/levels/sv_data.lua on line 23
6. lua/darkrp_modules/levels/sh_core.lua on line 200
7. addons/ulib/lua/ulib/shared/hook.lua on line 179
------- End of Simplerr error -------

Books

I have your level system with your prestige. When I add books to the books.lua, It doesnt pop up. Many people are having problems with this. Help?

Couldn't include file 'config.lua' (File not found)

I have the lastest version. But for some reason I get these errors.

Couldn't include file 'config.lua' (File not found) (@addons/darkrpmodification/lua/darkrp_modules/levels/sh_custom.lua (line 42))
Couldn't include file 'books.lua' (File not found) (@addons/darkrpmodification/lua/darkrp_modules/levels/sh_custom.lua (line 48))
Couldn't include file 'printers.lua' (File not found) (@addons/darkrpmodification/lua/darkrp_modules/levels/sh_custom.lua (line 49))

Im having a problem i have 2-3 lau errors

the lua error is like this

There are 2 Lua problems!
Please check your console for more information!
[ERROR] A runtime error has occurred in "addons/levels/lua/darkrp_modules/levels/sv_data.lua" on line 28.
The best help I can give you is this:

Warning! DarkRPVar 'xp' wasn't registered!
Please contact the author of the DarkRP Addon to fix this.
Until this is fixed you don't need to worry about anything. Everything will keep working.
It's just that registering DarkRPVars would make DarkRP faster.

Hints:
- No hints, sorry.

The responsibility for this error lies with (the authors of) one (or more) of these files:
1. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 28
2. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 14
3. gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua on line 291
4. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 14
5. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 23
6. addons/levels/lua/darkrp_modules/levels/sh_core.lua on line 200
7. addons/ulib/lua/ulib/shared/hook.lua on line 110
------- End of Simplerr error -------

[ERROR] A runtime error has occurred in "addons/levels/lua/darkrp_modules/levels/sv_data.lua" on line 29.
The best help I can give you is this:

Warning! DarkRPVar 'level' wasn't registered!
Please contact the author of the DarkRP Addon to fix this.
Until this is fixed you don't need to worry about anything. Everything will keep working.
It's just that registering DarkRPVars would make DarkRP faster.

Hints:
- No hints, sorry.

The responsibility for this error lies with (the authors of) one (or more) of these files:
1. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 29
2. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 14
3. gamemodes/darkrp/gamemode/libraries/mysqlite/mysqlite.lua on line 291
4. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 14
5. addons/levels/lua/darkrp_modules/levels/sv_data.lua on line 23
6. addons/levels/lua/darkrp_modules/levels/sh_core.lua on line 200
7. addons/ulib/lua/ulib/shared/hook.lua on line 110
------- End of Simplerr error -------

Problem (Specific Detail)

Hey ok i fixed the adjustment took time to read the config :) <3

But there is still this 1 tiny little problem. In the books.lua i remove the 2 lines that it tells me to remove for the xp books to be enabled and then i put the TEAM_SCHOLAR (name of the job) that is supposed to be selling xp books. And i restart the server and boom he doesnt sell xp books? But if i say change name to like TEAM_CITIZEN it will work for citizen. Here is a pastebin of the books.lua.
http://pastebin.com/0cu3vNcr

Lag mysql system darkrp

Hello, I have a problem with your work, because of her terrible lags, lags occur because of the connection with mysql, the mysql load is very high, I checked on the script https://github.com/oubliette32/DBugR I niznayu what is the reason, but unfortunately, the whole process chews and play 6-10 hours is no longer possible, and the next day, eats half of the CPU hard if there is no lag. Can modify? Put it away I fell much load and no more problems. But your work is very good and I like it I wish I had.

How do i enable books??

When I made my custom books it didnt show up in game so i came on this website and saw it is disabled by default where would i enable it??

XP Books

Hello Author,

When I was trying to create XP Books all i got was nothing but errors... I used the .lua file for the book as well but nothing showd up in the entities list. So i used the darkrp modification and thats where the error occurred so I just stopped. How does one setup XP Books?

Adjustment.

So i cant get the xp books to work for my job called scholar.or any other job except citizen. i dont know why. And there is another issue. can you help me adjust my level hud? its to far down below the hud i am using and i want to adjust it perfectly. please help!

Can't change NPC xp values

So I was trying to change the xp amounts for killing NPCs, could anyone help me? I went into sh_config and made the XP to 500, instead of 10, aaaand nothing changed

problem < pls help me

i removed the addon and the xp bar did'nt removed and f4 menu printer did'nt removed

sorry my english bad but i hope you understand me

Drop money instead of straight to wallet.

Hi there,

I was wondering if there was a way to make the printers spawn money as an entity when used by the player, instead of adding it directly to your wallet.

Thanks in advance :)

Removing level indication + color on jobs?

When I go on my server, the addon works fine but the jobs change color (red or green) and say the level next to them. I wouldnt mind the level indication but the color really stands out and efects the game's quality.

Also, how can you set levels for certain people?

books.lua doesn't work

As the title states above when i edit the books.lua file and enter some books it doesnt show them in the entities tab. Do i have to put them in the entities.lua in darkrpmodifications/lua/customthings?

Disabling the EXP Bar

How would I go about that? had a snoop around couldn't find much apart from a lot of cussing whilst drawing the hud in the code :)

[suggestion] Exp module

possible, add the amount of exp to Kill a player?
something like:

LevelSystemConfiguration.KillModule = False //Only module kill money
LevelSystemConfiguration.Friendly = true
LevelSystemConfiguration.TakeAwayMoneyAmount = 100

LevelSystemConfiguration.Expmodule = true //Only exp kill
LevelSystemConfiguration.Expammount = 150 //Amount of exp to kill.

Printers for certain ranks.

Hi,

I know this question has been "answered" before, but the answer is of little use,
I've tried several different ways of restricting printers to certain ranks, but to no avail, I was wondering if you could help?

local Printer={}
Printer.Name = 'Ruby Printer'
Printer.Type = 'ruby'
Printer.XPPerPrint = 0
Printer.MoneyPerPrint = 250
Printer.Color = Color(185,0,0)
Printer.Model = 'models/props_lab/reciever01a.mdl'
Printer.Price = 12500
Printer.Level = 0
Printer.Prestige = 0
customCheck = function(ply) return table.HasValue({"vip_user", "vip_respected", "vip_moderator", "vip_senior_moderator", "vip_admin", "vip_sadmin", "vip_superadmin"}, ply:GetUserGroup() == "vip_user") end
customCheckFailMsg = "In order to use this printer, you must donate to become a VIP."
table.insert(Printers,Printer)

That custom check doesnt work... Can you tell me a WORKING way to do this?
Thanks

Printer Spawning Crashes Server

When I spawn any type of printer it crashes the server, it gives no lua error. I've been trying to fix it for a couple hours, but I can't find the issue.I'm using the most updated version of this module.

Pocket not merging

I would like the script to merge with the current pocket script I have, but it always see it switching to the default pocket. I preferably would just like to disable the pocket that comes with your script due to it semi deleting everyone's hard earned stuff

Error Help Please Spaming consle every time i give levels or some one levels up

[ERROR] addons/ulx/lua/ulx/modules/sh/levels.lua:34: attempt to concatenate local 'calling_ply' (a userdata value)

  1. call - addons/ulx/lua/ulx/modules/sh/levels.lua:34
    1. __fn - addons/ulib/lua/ulib/shared/commands.lua:943
    2. unknown - addons/ulib/lua/ulib/shared/commands.lua:1296
      1. Run - lua/includes/modules/concommand.lua:54
      2. unknown - addons/ulib/lua/ulib/shared/commands.lua:1310
      3. unknown - lua/includes/modules/concommand.lua:54

Seriously, I need help.

I have searched my addon up and down and there is not a true/false thing to enable or disable the green and red job colour. Please help!

Players levels reset to 0 on server restart along with an error in console, and XP books are not showing up in the F4 menu

Everytime our server restarts, every players level is reset to 0 and an error also pops up into console.

[ERROR] gamemodes/darkrp/gamemode/modules/base/sh_entityvars.lua:80: attempt to index local 'DarkRPVar' (a nil value)
  1. readNetDarkRPVar - gamemodes/darkrp/gamemode/modules/base/sh_entityvars.lua:80
   2. func - gamemodes/darkrp/gamemode/modules/base/cl_entityvars.lua:37
    3. unknown - lua/includes/modules/net.lua:32

And for some reason the XP books do not seem to appear in the F4 menu. This is our sh_custom.lua

// Love Manolis Vrondakis - @vrondakis - manolisvrondakis.com
// This is the configuration file, believe it or not.
// If you like this script, you can support me by buying my prestige system - http://coderhire.com/scripts/view/1082
// Or donating through Paypal: manolisvrondakis@gmail.com

// You may do what you want with this code, as long as you do not sell it and credit the original author (me)

LevelSystemConfiguration = {} // Leave this :)
local Printers = {} // This too
local XPBooks = {} // And this

TEAM_madscientist = DarkRP.createJob("Mad scientist", {
    color = Color(238, 118, 176, 255),
    model = {"models/player/aphaztech.mdl"},
    description = [[Lvl 1 Needed. You are the only person that sells xp books.]],
    weapons = {"weapon_empty_hands", "weapon_fists"},
    command = "madscientist",
    max = 6,
    salary = 800,
    admin = 0,
    vote = false,
    hasLicense = false,
    level = 1
})

// Okay so, clientside settings first, such as the HUD.                                                

LevelSystemConfiguration.EnableHUD = true // Is the HUD enabled?
LevelSystemConfiguration.LevelColor = Color(255,255,255,255) // The color of the "Level: 1" HUD element. White looks best. (This setting is nullified if you have the prestige system)
LevelSystemConfiguration.XPTextColor = Color(255,255,255,255) // The color of the XP percentage HUD element.
LevelSystemConfiguration.LevelBarColor = {6,116,255} // The color of the XP bar. (Sorry this one is different. It is still RGB)
LevelSystemConfiguration.LevelTextPos = {1.5, 200.0} // The position of the LevelText. Y starts from bottom. Fiddle with it

LevelSystemConfiguration.GreenJobBars = true // Are the green bars at the bottom of jobs enabled? KEEP THIS TRUE!
LevelSystemConfiguration.GreenAllBars = true // Are the green bars at the bottom of everything but jobs enabled? I WOULD VERY MUCH RECCOMEND THIS TO BE TRUE.

//Now, let us configure the ways (other than printers) that players get XP
LevelSystemConfiguration.KillModule = true // Give XP + Money for kills! // Next 2 settings control this.
LevelSystemConfiguration.Friendly = true // Only take away money / give XP if the killer is a lower level/same level than the victim. KEEP THIS TO TRUE UNLESS YOU WANT A STUPID RDM MINGEFEST SERVER.
LevelSystemConfiguration.TakeAwayMoneyAmount = 100 // How much money to take away from players when they are killed and add to the killer. You can change this to 0 if none. The XP amount is dynamic.

LevelSystemConfiguration.NPCXP = true // Give XP when an NPC is killed?
LevelSystemConfiguration.NPCXPAmount = 10 // Amount of XP to give when an NPC is killed

LevelSystemConfiguration.TimerModule = true // Give XP to everybody every howeverlong
LevelSystemConfiguration.Timertime = 100 // How much time (in seconds) until everybody gets given XP
LevelSystemConfiguration.TimerXPAmount = 100 // How much XP to give each time it goes off
LevelSystemConfiguration.YourServerName = "on Rave Gaming" // The notifcation text ish. "You got 100XP for playing on this sexy server"

//Next, general settings
LevelSystemConfiguration.XPMult = 5 // How hard it is to level up. 2 would require twice as much XP, ect.
LevelSystemConfiguration.MaxLevel = 100 // The max level
LevelSystemConfiguration.ContinueXP = false // If remaining XP continues over to next levels. I recommend this to be false. Seriously. What if a level 1 gets 99999999 XP somehow? He is level 99 so quickly.

//Printer settings
LevelSystemConfiguration.PrinterSound = true // Give the printers sounds?
LevelSystemConfiguration.PrinterMaxP = 4 // How many times a printer can print before stopping. Change this to 0 if you want infine.
LevelSystemConfiguration.PrinterMax = 4 // How many printers of a certain type a player can own at any one time
LevelSystemConfiguration.PrinterOverheat = false // Can printers overheat?
LevelSystemConfiguration.PrinterTime = 120 // How long it takes printers to print
LevelSystemConfiguration.KeepThisToTrue = true // Can players collect from printers that are 5 levels above their level? PLEASE KEEP THIS TRUE FOR GOD SAKE
LevelSystemConfiguration.Epilepsy = true // If printers flash different colors when they have money in them. (This is only added because somebody will complain about the removal of the green printers.)

//Let us add/change printers! Super easily!

/*TEMPLATE CODE/*
local Printer= {} // Leave this line
Printer.Name = 'Your Printer Name'
Printer.Type = 'yourprintername' // A UNIQUE identifier STRING, can be anything. NO SPACES! The player does not see this.
Printer.XPPerPrint = 10 // How much XP to give a player every time they print.
Printer.MoneyPerPrint = 50 // How much money to give a player every time they print.
Printer.Color = Color(255,255,255,255) // The color of the printer. Setting it to (255,255,255,255) will make it the normal prop color.
Printer.Model = 'models/props_lab/reciever01b.mdl' // The model of the printer. To find the path of a model, right click it in the spawn menu and click "Copy to Clipboard"
Printer.Prestige = 0 // The prestige you have to be to buy the printer. Only works with the prestige DLC.
table.insert(Printers,Printer) // Leave this line
*/

// Here are the default printers:

local Printer={}
Printer.Name = 'Regular Printer - Lvl 1'
Printer.Type = 'regularprinter'
Printer.XPPerPrint = 65
Printer.MoneyPerPrint = 100
Printer.Color = Color(255,255,255,255)
Printer.Model = 'models/props_lab/reciever01b.mdl'
Printer.Price = 1000
Printer.Level = 1
Printer.Prestige = 0

table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Golden Money Printer - Lvl 10'
Printer.Type = 'goldenprinter'
Printer.XPPerPrint = 300
Printer.MoneyPerPrint = 300
Printer.Color = Color(255,215,0)
Printer.Model = 'models/props_lab/reciever01b.mdl'
Printer.Price = 3000
Printer.Level = 10
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Ruby Money Printer - Lvl 20'
Printer.Type = 'rubyprinter'
Printer.XPPerPrint = 1069
Printer.MoneyPerPrint = 1200
Printer.Color = Color(255,0,0)
Printer.Model = 'models/props_lab/reciever01a.mdl'
Printer.Price = 5000
Printer.Level = 20
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Platinum Money Printer - Lvl 30'
Printer.Type = 'platprinter'
Printer.XPPerPrint = 1800
Printer.MoneyPerPrint = 1500
Printer.Color = Color(255,255,255)
Printer.Model = 'models/props_c17/consolebox03a.mdl'
Printer.Price = 10000
Printer.Level = 30
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Diamond Money Printer - Lvl 40'
Printer.Type = 'diamondprinter'
Printer.XPPerPrint = 2500
Printer.MoneyPerPrint = 5000
Printer.Color = Color(135,200,250)
Printer.Model = 'models/props_c17/consolebox01a.mdl'
Printer.Price = 50000
Printer.Level = 40
Printer.Prestige = 0
table.insert(Printers,Printer)


local Printer={}
Printer.Name = 'Emerald Money Printer - Lvl 50'
Printer.Type = 'emeraldprinter'
Printer.XPPerPrint = 3550
Printer.MoneyPerPrint = 10000
Printer.Color = Color(0,100,0)
Printer.Model = 'models/props_c17/consolebox01a.mdl'
Printer.Price = 100000
Printer.Level = 50
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Unubtainium Money Printer - Lvl 60'
Printer.Type = 'unubprinter'
Printer.XPPerPrint = 3500
Printer.MoneyPerPrint = 15000
Printer.Color = Color(255,255,255)
Printer.Model = 'models/props_lab/harddrive01.mdl'
Printer.Price = 120000
Printer.Level = 60
Printer.Prestige = 0
table.insert(Printers,Printer)

//XP books! PLEASE DO NOT HAVE THESE. THEY LINK MONEY DIRECTLY TO XP WHICH IS VERY BAD! IF YOU WANT A GOOD SERVER, KEEP IT OFF. Some people wanted them. For some reason.
// Also, do not allow people to donate for a free prestige. That is retarded. Also, buy my prestige system.
// They are books that you can purchase from the F4 menu that give you XP. (Love you Xeviax)


//If you are having trouble with books, aka them not showing up in the F4 menu, then put the code for the job at the top of this file.

/*TEMPLATE CODE/*
local Book={}
Book.Name = 'Your Book Name'
Book.XPOnUse = 1000 // The amount of XP to give when E is pressed on the book
Book.Model = "models/props_lab/bindergraylabel01a.mdl" // The model of the book
Book.Level = 1 // The level required to purchase it
Book.Price = 10000 // The price of the book
Book.Allowed = {} // The teams allowed to purchase the book.
Book.Type = 'yourbookname' // A unique identifier (NO SPACES!)
Book.CustomCheck = function() end // Some custom check here. For VIP books and stuff.
Book.Prestige = 0 // The prestige required to purchase the book. Only works with my prestige DLC.
table.insert(XPBooks,Book) // Leave this :)
*/

// A sample book: (Remove the /* and */ if you want to use this one.)

local Book={}
Book.Name = '1000XP Book'
Book.XPOnUse = 1000
Book.Model = "models/props_lab/bindergraylabel01a.mdl"
Book.Level = 1
Book.Price = 10000
Book.Allowed = {TEAM_madscientist}
Book.Type = '1000xpbookxoxo'
table.insert(XPBooks,Book)

// Leave this. Seriously, if you edit this and break it some how, I am not going to help you.


        for k,v in pairs(XPBooks) do
                local Errors = {}
                if not type(v.Name) == 'string' then table.insert(Errors, 'The name of an XP Book is INVALID!') end
                if not type(v.Type) == 'string' then table.insert(Errors, 'The name of an XP Book is INVALID!') end
                if not type(v.Model) == 'string' then table.insert(Errors, 'The model of an XP Book is INVALID!') end
                if not type(v.XPOnUse) == 'number' then table.insert(Errors, 'The XPOnUse of an XP Book is INVALID!') end
                if not type(v.Level) == 'number' then table.insert(Errors, 'The level of an XP Book is INVALID!') end
                if not type(v.Allowed) == 'table' then table.insert(Errors, 'The allowed of an XP Book is INVALID!') end
                if not type(v.Price) == 'number' then table.insert(Errors, 'The price of an XP Book is INVALID!') end
                local ErrorCount = 0
                for k,v in pairs(Errors) do
                        error(v)
                        ErrorCount = ErrorCount + 1
                end

                if not(ErrorCount==0) then return false end
                DarkRP.createEntity(v.Name,{
                        ent="vrondakis_book",
                        model=v.Model,
                        price=v.Price,
                        level=v.Level,
                        allowed=v.Allowed,
                        cmd=v.Type,
                        max = 4,
                        prestige=(v.Prestige or 0),
                        customCheck = (v.CustomCheck or function() end),
                        GiveXPAmountOnUse = v.XPOnUse,
                })
        end


        for k,v in pairs(Printers) do
                local Errors = {}
                if not type(v.Name) == 'string' then table.insert(Errors, 'The name of a printer is INVALID!') end
                if not type(v.Type) == 'string' then table.insert(Errors, 'The type of a printer is INVALID!') end
                if not type(v.XPPerPrint) == 'number' then table.insert(Errors, 'The XP of a printer is INVALID!') end
                if not type(v.MoneyPerPrint) == 'number' then table.insert(Errors, 'The money of a printer is INVALID!') end
                if not type(v.Color) == 'table' then table.insert(Errors, 'The color of a printer is INVALID!') end
                if not type(v.Model) == 'string' then table.insert(Errors, 'The model of a printer is INVALID!') end
                if not type(v.Price) == 'number' then table.insert(Errors, 'The price of a printer is INVALID!') end
                if not type(v.Level) == 'number' then table.insert(Errors, 'The level of a printer is INVALID!') end
                local ErrorCount = 0
                for k,v in pairs(Errors) do
                        error(v)
                        ErrorCount = ErrorCount + 1
                end

                if not(ErrorCount==0) then return false end

                DarkRP.createEntity(v.Name,{
                        ent = "vrondakis_printer",
                        model = v.Model,
                        price = v.Price,
                        prestige = (v.Prestige or 0),
                        printer = true,
                        level = v.Level,
                        max = LevelSystemConfiguration.PrinterMax,
                        cmd = 'buyvrondakis'..v.Type..'printer',
                        vrondakisName = v.Name,
                        vrondakisType = v.Type,
                        vrondakisXPPerPrint = v.XPPerPrint,
                        vrondakisMoneyPerPrint = v.MoneyPerPrint,
                        vrondakisColor = v.Color,
                        vrondakisModel = v.Model,
                        vrondakisOverheat = LevelSystemConfiguration.PrinterOverheat,
                        PrinterMaxP = LevelSystemConfiguration.PrinterMaxP,
                        vrondakisPrinterTime = LevelSystemConfiguration.PrinterTime,
                        vrondakisIsBuyerRetarded = LevelSystemConfiguration.KeepThisToTrue,
                        vrondakisEpileptic = LevelSystemConfiguration.Epilepsy
                })

        end


/*
and i even added this entity to entities

DarkRP.createEntity("1000XP Book - Lvl 1", {
    ent = "1000xpbookxoxo",
    model = "models/props_lab/bindergraylabel01a.mdl",
    price = 10000,
    max = 1,
    cmd = "buyxpbook1000",
    level = 1,
    allowed = {TEAM_madscientist}
*/
})

Also, we're experiencing a minor bug with the XP Bar, it goes over.

image

We also have the Prestige DLC if that helps.

Thanks in advance for the help!

problem with f4

Every time I installed the mod when I go to the game I do not see the jobs or the shipments. I see nothing in F4, the install it was good. Help

there is no XP giving out

i try to re install and fix but nothing its not giving out XP
sh_config.lua
/////////////////////////
// Configuration file //
/////////////////////////

LevelSystemConfiguration = {} // Ignore
Printers = {} // Ignore

LevelSystemConfiguration.EnableHUD = true // Is the HUD enabled?
LevelSystemConfiguration.LevelColor = Color(255,255,255,255) // The color of the "Level: 1" HUD element. White looks best. (This setting is nullified if you have the prestige system)
LevelSystemConfiguration.XPTextColor = Color(255,255,255,255) // The color of the XP percentage HUD element.
LevelSystemConfiguration.LevelBarColor = {6,116,255} // The color of the XP bar. (Sorry this one is different. It is still {R,G,B})
LevelSystemConfiguration.LevelTextPos = {1.5, 180.0} // The position of the LevelText. Y starts from bottom. Fiddle with it

LevelSystemConfiguration.GreenJobBars = true // Are the green bars at the bottom of jobs enabled? KEEP THIS TRUE!
LevelSystemConfiguration.GreenAllBars = true // Are the green bars at the bottom of everything but jobs enabled? Recommended(true)

LevelSystemConfiguration.KillModule = true // Give XP + Money for kills! // Next 2 settings control this.
LevelSystemConfiguration.Friendly = true // Only take away money / give XP if the killer is a lower level/same level than the victim. (Recommended:true)
LevelSystemConfiguration.TakeAwayMoneyAmount = 100 // How much money to take away from players when they are killed and add to the killer. You can change this to 0 if none. The XP amount is dynamic.

LevelSystemConfiguration.NPCXP = true // Give XP when an NPC is killed?
LevelSystemConfiguration.NPCXPAmount = 10 // Amount of XP to give when an NPC is killed

LevelSystemConfiguration.TimerModule = true // Give XP to everybody every howeverlong
LevelSystemConfiguration.Timertime = 100 // How much time (in seconds) until everybody gets given XP
LevelSystemConfiguration.TimerXPAmount = 100 // How much XP to give each time it goes off
LevelSystemConfiguration.YourServerName = "on the server" // The notifcation text ish. "You got 100XP for playing on the server."

LevelSystemConfiguration.XPMult = 1 // How hard it is to level up. 2 would require twice as much XP, ect.
LevelSystemConfiguration.MaxLevel = 99 // The max level
LevelSystemConfiguration.ContinueXP = false // If remaining XP continues over to next levels. I recommend this to be false. Seriously. What if a level 1 gets 99999999 XP somehow? He is level 99 so quickly.

//Printer settings
LevelSystemConfiguration.PrinterSound = true // Give the printers sounds?
LevelSystemConfiguration.PrinterMaxP = 4 // How many times a printer can print before stopping. Change this to 0 if you want infine.
LevelSystemConfiguration.PrinterMax = 4 // How many printers of a certain type a player can own at any one time
LevelSystemConfiguration.PrinterOverheat = false // Can printers overheat?
LevelSystemConfiguration.PrinterTime = 120 // How long it takes printers to print
LevelSystemConfiguration.KeepThisToTrue = true // Can players collect from printers that are 5 levels above their level? (Recommended: false)
LevelSystemConfiguration.Epilepsy = true // If printers flash different colors when they have money in them.

/Template Code/
local Printer= {} // Leave this line
Printer.Name = 'Your Printer Name'
Printer.Type = 'yourprintername' // A UNIQUE identifier STRING, can be anything. NO SPACES! The player does not see this.
Printer.XPPerPrint = 10 // How much XP to give a player every time they print.
Printer.MoneyPerPrint = 50 // How much money to give a player every time they print.
Printer.Color = Color(255,255,255,255) // The color of the printer. Setting it to (255,255,255,255) will make it the normal prop color.
Printer.Model = 'models/props_lab/reciever01b.mdl' // The model of the printer. To find the path of a model, right click it in the spawn menu and click "Copy to Clipboard"
Printer.Prestige = 0 // The prestige you have to be to buy the printer. Only works with the prestige DLC.
table.insert(Printers,Printer) // Leave this line
*/

// Default printers:

local Printer={}
Printer.Name = 'Regular Printer'
Printer.Type = 'regularprinter'
Printer.XPPerPrint = 65
Printer.MoneyPerPrint = 100
Printer.Color = Color(255,255,255,255)
Printer.Model = 'models/props_lab/reciever01b.mdl'
Printer.Price = 1000
Printer.Level = 1
Printer.Prestige = 0

table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Golden Money Printer'
Printer.Type = 'goldenprinter'
Printer.XPPerPrint = 300
Printer.MoneyPerPrint = 300
Printer.Color = Color(255,215,0)
Printer.Model = 'models/props_lab/reciever01b.mdl'
Printer.Price = 3000
Printer.Level = 10
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Ruby Money Printer'
Printer.Type = 'rubyprinter'
Printer.XPPerPrint = 1069
Printer.MoneyPerPrint = 1200
Printer.Color = Color(255,0,0)
Printer.Model = 'models/props_lab/reciever01a.mdl'
Printer.Price = 5000
Printer.Level = 20
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Platinum Money Printer'
Printer.Type = 'platprinter'
Printer.XPPerPrint = 1800
Printer.MoneyPerPrint = 1500
Printer.Color = Color(255,255,255)
Printer.Model = 'models/props_c17/consolebox03a.mdl'
Printer.Price = 10000
Printer.Level = 30
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Diamond Money Printer'
Printer.Type = 'diamondprinter'
Printer.XPPerPrint = 2500
Printer.MoneyPerPrint = 5000
Printer.Color = Color(135,200,250)
Printer.Model = 'models/props_c17/consolebox01a.mdl'
Printer.Price = 50000
Printer.Level = 40
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Emerald Money Printer'
Printer.Type = 'emeraldprinter'
Printer.XPPerPrint = 3550
Printer.MoneyPerPrint = 10000
Printer.Color = Color(0,100,0)
Printer.Model = 'models/props_c17/consolebox01a.mdl'
Printer.Price = 100000
Printer.Level = 50
Printer.Prestige = 0
table.insert(Printers,Printer)

local Printer={}
Printer.Name = 'Unubtainium Money Printer'
Printer.Type = 'unubprinter'
Printer.XPPerPrint = 3500
Printer.MoneyPerPrint = 15000
Printer.Color = Color(255,255,255)
Printer.Model = 'models/props_lab/harddrive01.mdl'
Printer.Price = 120000
Printer.Level = 60
Printer.Prestige = 0
table.insert(Printers,Printer)

// Ignore everything under this line.

hook.Add("loadCustomDarkRPItems", "manolis:MVLevels:CustomLoad", function()

for k,v in pairs(Printers) do
    local Errors = {}
    if not type(v.Name) == 'string' then table.insert(Errors, 'The name of a printer is INVALID!') end
    if not type(v.Type) == 'string' then table.insert(Errors, 'The type of a printer is INVALID!') end
    if not type(v.XPPerPrint) == 'number' then table.insert(Errors, 'The XP of a printer is INVALID!') end
    if not type(v.MoneyPerPrint) == 'number' then table.insert(Errors, 'The money of a printer is INVALID!') end
    if not type(v.Color) == 'table' then table.insert(Errors, 'The color of a printer is INVALID!') end
    if not type(v.Model) == 'string' then table.insert(Errors, 'The model of a printer is INVALID!') end
    if not type(v.Price) == 'number' then table.insert(Errors, 'The price of a printer is INVALID!') end
    if not type(v.Level) == 'number' then table.insert(Errors, 'The level of a printer is INVALID!') end
    local ErrorCount = 0
    for k,v in pairs(Errors) do
        error(v)
        ErrorCount = ErrorCount + 1
    end

    if not(ErrorCount==0) then return false end

    DarkRP.createEntity(v.Name,{
        ent = "vrondakis_printer",
        model = v.Model,
        price = v.Price,
        prestige = (v.Prestige or 0),
        printer = true,
        level = v.Level,
        max = LevelSystemConfiguration.PrinterMax,
        cmd = 'buyvrondakis'..v.Type..'printer',
        vrondakisName = v.Name,
        vrondakisType = v.Type,
        vrondakisXPPerPrint = v.XPPerPrint,
        vrondakisMoneyPerPrint = v.MoneyPerPrint,
        vrondakisColor = v.Color,
        vrondakisModel = v.Model,
        customCheck = (v.CustomCheck or function() return true end),
        vrondakisOverheat = LevelSystemConfiguration.PrinterOverheat,
        PrinterMaxP = LevelSystemConfiguration.PrinterMaxP,
        vrondakisPrinterTime = LevelSystemConfiguration.PrinterTime,
        vrondakisIsBuyerRetarded = LevelSystemConfiguration.KeepThisToTrue,
        vrondakisEpileptic = LevelSystemConfiguration.Epilepsy
    })

end

end)

DarkRP.registerDarkRPVar("xp", net.WriteDouble, net.ReadDouble)
DarkRP.registerDarkRPVar("level", net.WriteDouble, net.ReadDouble)
DarkRP.registerDarkRPVar("prestige", net.WriteDouble, net.ReadDouble)

No XP

Ok i have it so every so often the addon gives out 200 XP For Playing said server and what not right. so i updated it and now it say's "0XP for playing on Server Name" and the printers shoot money out correctly but not xp it gives 0 XP out can you help me figure this out i have not touched the printer text ether

Having Installing Problems

I put the Addons in, But It still does not work, and it's not my server, I think it's me just being dumb, But Help would be thanked alot

Not applying ingame

I have a slight issue with installing this script, this is the file directory i did with it : C:\GMOD\garrysmod\addons and ive tried : C:\GMOD\garrysmod\addons\darkrpmodification\lua\darkrp_modules
im sure you are very busy so if you could help me with this very small issue i would appreciate it thx

Player disconnect

When a player disconnects, their printer stays. I added this to try and fix that, but it hasn't worked. I don't know if something is conflicting or what, I just need some help with this one.

function ENT:PlayerDisconnect()
self:Destruct()
self:Remove()
end
hook.Add("PlayerDisconnected", "OnPlayerDisconnect1234", PlayerDisconnect)

All jobs turn green

The addon works flawlessly, however, I noticed for some reason, it makes all jobs in the F4 menu green (or the Citizen's default color), I already tested it without the addon and this doesn't happen, so it's definitely this addon what's causing it. I'm running DarkRP 2.6.1, and it shows no lua/script errors when opening the server, when joining it, or when pressing F4, so I have no clue of what the cause is. Please take a look at this.

setOrder help?

Is there any way that I can put in a setOrder for F4 menu? I've tried so many different ways, it's not working.

There must be some other entity that has the value 'buyvrondakisregularprinterprinter' for 'cmd'.

I do not mean to bother but i am sure that this new update does not solve this issue. i have re installed the add-on multiple times and i still run into this error please get back to me as soon as possible. here is the whole error

There is 1 Lua problem!
Please check your console for more information!
[ERROR] A runtime error has occurred in "addons/darkrpmodification/lua/darkrp_modules/levels/sh_config.lua" on line 170.
The best help I can give you is this:

Corrupt entity: Regular Printer!
This entity does not have a unique value for 'cmd'.

Hints:
- There must be some other entity that has the value 'buyvrondakisregularprinterprinter' for 'cmd'.

The responsibility for this error lies with (the authors of) one (or more) of these files:
1. addons/darkrpmodification/lua/darkrp_modules/levels/sh_config.lua on line 170
2. addons/ulib/lua/ulib/shared/hook.lua on line 184
3. gamemodes/darkrp/gamemode/libraries/modificationloader.lua on line 141
4. addons/ulib/lua/ulib/shared/hook.lua on line 184
5. gamemodes/darkrp/gamemode/init.lua on line 81
------- End of Simplerr error -------

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.