Giter Site home page Giter Site logo

darkrpmodification's Introduction

LinkedIn ย 

  • ๐ŸŽฎ Main developer of several popular addons for Garry's Mod
  • ๐Ÿ–ฅ๏ธ Fell in love with Haskell during my Bachelor's at Utrecht University, and continued working with it through my master's, and subsequent professional work
  • ๐Ÿ“  Currently work at Channable as Infra Team Lead
  • ๐Ÿฆœ Hobbies include bird watching and programming

๐Ÿ› ๏ธ My biggest projects

  • DarkRP (workshop) - A roleplay gamemode for Garry's Mod. Not originally created by me, but I have been its main developer since 2008. It has been the most popular gamemode for years
  • Falco's Prop Protection (workshop) - An addon for Garry's mod that handles access management for the contraptions built by players
  • Glualint - A linter and formatter for Garry's mod's flavour of Lua. Available on four platforms and GitHub Actions.
  • Glualint-web - Fully clientside web version of glualint, built on the now somewhat dated GHCJS
  • VSCode Semaphore CI plugin (marketplace) - Plugin for VS Code to interact with Semaphore CI

๐Ÿ† Things that I am proud of

  • ๐Ÿ‘ด Maintained DarkRP and FPP for over 15 years. These projects were on Google Code (SVN) before they moved to GitHub in 2012
  • ๐Ÿ“ˆ Over 4000 resolved issues and pull requests
  • ๐ŸŒŸ A five-star rating, with over 39.000 ratings on DarkRP's workshop page

๐Ÿ“š My publications

darkrpmodification's People

Contributors

art-gur avatar aws0mee avatar bo98 avatar cyanpone avatar djtb2924 avatar donkie avatar down-s avatar florianlechat avatar fptje avatar githubfuckedmyoldaccount avatar johndoeno001 avatar liondadev avatar menschlichtv avatar mleonhard38 avatar namefui avatar prop-physics avatar satton2 avatar servius avatar squirrelkiev avatar xbread avatar zignd 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  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  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  avatar

Watchers

 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

darkrpmodification's Issues

Spawn with ammo

Ok i have m9k installed and have it added to a few classes but when people would switch to that job then take out the weapon they do not have any ammo for that weapon
so how would i make it where that job would have ammo?

CP issues

Hi im trying to set the cp's but i keep getting this error

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:42: table index is nil

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:42
    1. doInclude - [C]:-1
    2. loadCustomDarkRPItems - gamemodes/methrp/gamemode/libraries/modificationloader.lua:137
      1. Call - gamemodes/methrp/gamemode/libraries/modificationloader.lua:148
      2. unknown - gamemodes/methrp/gamemode/cl_init.lua:53

this is what my cp's look like

GAMEMODE.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_CHIEF] = true,
[TEAM_MAYOR] = true,
[TEAM_SWAT] = true,
}

is there something im doing wrong? because the swat job is in there

Memory leak in MySQLOO

Hello,
I just read the "\lua\darkrp_config\mysql.lua"

--[[
MANUAL!
HOW TO USE MySQL FOR DARKRP!
Download andyvincent's/Drakehawke's/KingofBeast's gm_MySQL OO module and read the guide here:
http://facepunch.com/showthread.php?t=1357773
]]

and you should probably recommend users to use tmysql4 instead of mysqloo.
The problem with mysqloo:

  1. the memory leak (> "Objects created in mysql::query commands will not be carbage collected" - facepunch forum)
  2. Hasn't been updated for a long time

Greetings,
Momox

Interesting issue when it comes to shipments.

Many DarkRP servers over time face several trivial issues that players like to focus REALLY hard on when they are really only, well, trivial. Some issues are levels, sever economies, staffing, etc. While working on an overhaul on our weapons system I decided to avoid erasing player inventories by creating variants to use the new stats and prices laid out in our overhaul. I thought this would save time since I could just go through to the old shipment codes and just swap out the shipment id to the new variant ie darkrp_ak47 ->darkrp_ak47_variant but what ended up happening was everyones shipments ended up getting swapped over to a random swep on the server. Some people had 300 shotguns in their inventory and when the shipment code switched they ended up with 300 sound sweps stacked into each other (and many more ridiculous situations)

What Ive tried so far is reverting one of the changed shipments back to the og id ie darkrp_ak47_variant -> darkrp_ak47 and the weapons swapped back to their form which is fine...I guess. Now I could go through and revert them all and then just write new shipment code for all the variants and just call it a done day but there is still one issue left I dont want to sell the og weapons on either one of my dealers. Is there a way to have the shipment code be there but not be sold? Thank you for reading.

DisabledCustomModules not set without the addon

I was working on updating an old module of mine and wanted to put it into addon format. When having an addon with only darkrp_modules/modulename and the files in there the module doesn't load:

[ERROR] gamemodes/darkrp/gamemode/libraries/modificationloader.lua:60: attempt to index field 'DisabledCustomModules' (a nil value)
  1. loadModules - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:60
   2. fn - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:119
    3. unknown - addons/ulib/lua/ulib/shared/hook.lua:183

Would be nice if Cofnig.DisabledCustomModules is in the default config, instead of in the modification addon so people dont have to install it.

[REQ] Hunger HUD disable

Can an option also be added to disable the hunger hud, in the hudreplacement? I understand setting ["DarkRP_HUD"] to true will disable everything on the HUD including hunger, but we would prefer to only disable the existing Hunger and LocalPlayerHud! Thanks

Dropping all weapons on death

When you have GM.Config.dropweapondeath set to true all weapons except for gravgun and toolgun will drop on death. Even though they're specified in the GM.Config.DisallowDrop list.

load behaviour

I would suggest to let the system load darkrpmodification/darkrp_config and darkrp_customthings first, as I only get trouble with other scripts as they usually load before and then can't find value 'X'.

Do the to-dos

Modifications don't seem to load.

The issue is pretty much as the title says. After adding stuff to the files in the modmaster, nothing seems to be loaded when the server is started up. No custom entities, shipments, jobs, huds, nothing. However, if I go into the settings.lua and view/edit it with filezilla and reload it, DarkRP gets refreshed and the settings are applied. Once I have done this, I also discovered that if I repeat the process with any of the other customizable files, they get loaded. However this only works if I update the settings file first.

I've tried reinstalling the mod master and with a fresh install of DarkRP. Nothing seems to work :/

Scoreboard help

How do i change my scoreboard ? i check the regular darkrp folders and i check the darkrpmodification i just cant find where to make one because a bought a very nice scoreboard off of codefire

"Weapons" tab disappears when default shipments are disabled

I'm disabling the default pistols because I want to replace them with M9K pistols

disabled_defaults.lua:
DarkRP.disabledDefaults["shipments"] = { ["AK47"] = true, ["Desert eagle"] = true, ["Fiveseven"] = true, ["Glock"] = true, ["M4"] = true, ["Mac 10"] = true, ["MP5"] = true, ["P228"] = true, ["Pump shotgun"] = true, ["Sniper rifle"] = true, }

I added custom guns to shipments.lua
DarkRP.createShipment("M9K Desert Eagle", { model = "models/weapons/w_tcom_deagle.mdl", entity = "m9k_deagle", price = 400, amount = 1, separate = true, pricesep = 400, noship = true, allowed = {TEAM_GUN}, category = "Pistols", })

DarkRP.createShipment("M9K Glock", { model = "models/weapons/w_dmg_glock.mdl", entity = "m9k_glock", price = 350, amount = 1, separate = true, pricesep = 350, noship = true, allowed = {TEAM_GUN}, category = "Pistols", })

DarkRP.createShipment("M9K Sig P229R", { model = "models/weapons/w_sig_229r.mdl", entity = "m9k_sig_p229r", price = 300, amount = 1, separate = true, pricesep = 300, noship = true, allowed = {TEAM_GUN}, category = "Pistols", })

gmod

When I enable at least one of the default weapons, the tab comes back.

DarkRP.disabledDefaults["shipments"] = { ["AK47"] = true, ["Desert eagle"] = true, ["Fiveseven"] = true, ["Glock"] = true, ["M4"] = true, ["Mac 10"] = true, ["MP5"] = true, ["P228"] = false, ["Pump shotgun"] = true, ["Sniper rifle"] = true, }

gmod2

error with darkrp

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:694: table index is nil

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:694
    1. include - [C]:-1
    2. loadCustomDarkRPItems - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:111
      1. fn - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:119
      2. unknown - addons/ulib/lua/ulib/shared/hook.lua:184

our hitmen jobs dont have press e on me for a hit

DarkRP Tip Jar config options

Recently a Tip Jar was added to the lastest version of DarkRP. I was wondering if there was a way to set it so only a specific team such as Hobo can access the jar entity or to simply remove it altogether?

weapon_ak47custom throws this error.

Description of the bug
On Load up I get a console error.

How to make the bug happen
Load up the server.

Lua errors
SWEP (weapon_ak47custom) is derived from non existant SWEP (weapon_cs_base2) - Expect errors!

Why the developer of DarkRP is responsible for this issue
He is responsible because, I have edited 0 files, I get no other issues and this error has only started to occur when I updated to latest DarkRP

DarkRP Ammunition - Not Working

My ammunition for DarkRP is not working. When I attempt to use the ammo, nothing pops up. It successfully appears in the F4 menu, and it successfully drops, but when you attempt to pick it up, no notification on the right-hand side appears, and you do not attain extra ammunition.You do spend money to buy it, and I am using the correct entity name to make it work. I have tried with both of my weapon addons installed to see if it was just one of them that was broken, and that seems not to be the case. If I spawn in the ammunition with the Q menu, it works perfectly.

EDIT: There is also no console errors.

Here is my ammo.lua code:

/---------------------------------------------------------------------------
/
---------------------------------------------------------------------------

Ammo types

Ammo boxes that can be purchased in the F4 menu.

Add your custom ammo types in this file. Here's the syntax:
DarkRP.createAmmoType("ammoType", {
name = "Ammo name",
model = "Model",
price = 1234,
amountGiven = 5678,
customCheck = function(ply) return ply:IsAdmin()
})

ammoType: The name of the ammo that Garry's mod recognizes
If you open your SWEP's shared.lua, you can find the ammo name next to
SWEP.Primary.Ammo = "AMMO NAME HERE"
or
SWEP.Secondary.Ammo = "AMMO NAME HERE"

name: The name you want to give to the ammo. This can be anything.

model: The model you want the ammo to have in the F4 menu

price: the price of your ammo in dollars

amountGiven: How much bullets of this ammo is given every time the player buys it

customCheck: (Optional! Advanced!) a Lua function that describes who can buy the ammo.
Similar to the custom check function for jobs and shipments
Parameters:
ply: the player who is trying to buy the ammo

Examples are below!

Pistol ammo type. Used by p228, desert eagle and all other pistols
Example 1:

Add new ammo types under the next line!
---------------------------------------------------------------------------*/
DarkRP.createAmmoType("ent_mad_ammo_shotgun", {
name = "Shotgun Shells",
model = "models/Items/BoxBuckshot.mdl",
price = 100,
amountGiven = 8
})

DarkRP.createAmmoType("ent_mad_ammo_338", {
name = ".338 Rounds",
model = "models/Items/BoxMRounds.mdl",
price = 100,
amountGiven = 25

})

DarkRP.createAmmoType("ent_mad_ammo_357", {
name = ".357 Rounds",
model = "models/Items/BoxSRounds.mdl",
price = 100,
amountGiven = 25

})

DarkRP.createAmmoType("ent_mad_ammo_45n", {
name = ".45 Rounds",
model = "models/Items/BoxSRounds.mdl",
price = 100,
amountGiven = 50

})

DarkRP.createAmmoType("ent_mad_ammo_50", {
name = "50cal Rounds",
model = "models/Items/BoxMRounds.mdl",
price = 100,
amountGiven = 25

})

DarkRP.createAmmoType("ent_mad_ammo_46mm", {
name = "4.6mm Rounds",
model = "models/Items/BoxMRounds.mdl",
price = 100,
amountGiven = 25

})

DarkRP.createAmmoType("ent_mad_ammo_556mm", {
name = "5.56mm Rounds",
model = "models/Items/BoxMRounds.mdl",
price = 250,
amountGiven = 100

})

DarkRP.createAmmoType("ammo_raygun", {
name = "Raygun Battery",
model = "models/raygun/ray_gun_battery.mdl",
price = 10,
amountGiven = 100

})

DarkRP.createAmmoType("ent_mad_ammo_556x39", {
name = "5.556x39 Rounds",
model = "models/Items/BoxMRounds.mdl",
price = 100,
amountGiven = 50

})

DarkRP.createAmmoType("ent_mad_ammo_556x45", {
name = "5.56x45 Rounds",
model = "models/Items/BoxMRounds.mdl",
price = 100,
amountGiven = 50

})

DarkRP.createAmmoType("ent_mad_ammo_57mm", {
name = "5.7mm Rounds",
model = "models/Items/BoxSRounds.mdl",
price = 150,
amountGiven = 50

})

DarkRP.createAmmoType("ent_mad_ammo_762mm", {
name = "7.62mm Rounds",
model = "models/Items/BoxMRounds.mdl",
price = 200,
amountGiven = 25

})

DarkRP.createAmmoType("ent_mad_ammo_9mm", {
name = "9mm Rounds",
model = "models/Items/BoxSRounds.mdl",
price = 100,
amountGiven = 25

})

Darkrpmodification isnt fully loading

Hello ,

After extracting darkrpmodification i restarted my server ,
Then i join the server and i see the script isnt working ,
there arent any errors about darkrpmodification.
I tried to reinstall it but didnt work.
I tried adding a job with tcb creator but didnt work

Only thing i found is :
Adding Filesystem Addon 'c:\services\ni415681_1\gmod13\garrysmod\addons\darkrpmodification'
If u wanna see my full logg its here :
http://pastebin.com/u4skkN52

Thanks already ,
Jonas

Jobs.lua isn't refresh

I have this error when i change and save my jobs.lua

Unhandled Lua Refresh: [NAME:darkrp_customthings/jobs.lua] [TYPE:!UNKNOWN]

Translation - Linux

I tested the language files multiple times.
In singleplayer and booth dedicated server, my custom translation works.
but however on my linux dedicated server it doesnt work. It needs a mapchange to fully work.

Adding more than one Entity doesn't work

Hey Guys,

The reason I asked here is because it seems to be a problem with the script (or I am just a nub XD).

DarkRP.createEntity("Money Printer", {
ent = "intel_money_printer",
model = "models/props_c17/consolebox01a.mdl",
price = 10000,
max = 3,
cmd = "buyintel",
})

DarkRP.createEntity("Money Printer - V.I.P", {
ent = "intel_money_printer",
model = "models/props_c17/consolebox01a.mdl",
price = 15000,
max = 2,
cmd = "buyinteldonator",
customCheck = function(ply) return ply:GetUserGroup == "donator" end,
CustomCheckFailMsg = "You need to be a V.I.P to buy two extra Money Printers!",
})

DarkRP.createEntity("Money Printer - Gold", {
ent = "intel_money_printer",
model = "models/props_c17/consolebox01a.mdl",
price = 20000,
max = 4,
cmd = "buyintelgold",
customCheck = function(ply) return ply:GetUserGroup == "gold" end,
CustomCheckFailMsg = "You need to be a Gold to buy four extra Money Printers!",
})

DarkRP.createEntity("Money Printer - Platinum", {
ent = "intel_money_printer",
model = "models/props_c17/consolebox01a.mdl",
price = 25000,
max = 10,
cmd = "buyintelplat",
customCheck = function(ply) return ply:GetUserGroup == "platinum" end,
CustomCheckFailMsg = "You need to be a Platinum to buy eight extra Money Printers!",
})

As a test I tried to add 4 different money printers however I can load the first one without any of the rest but as soon as I try to add more than one it comes up with this lua error,

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/entities.lua:27: function arguments expected near '='
unknown - addons/darkrpmodification-master/lua/darkrp_customthings/entities.lua:0

Cheers for your help,
I hope this issue isn't me XD but it probably is.

(made a new on because you closed it too quickly after I failed by pressing enter to go down and it posted XD)

Ownable doors

If a door is owned before you join the server ( I think ) then it does not appear owned to the client.

[BUG] Adding group chat

Following the example in groupchats.lua:

-- Example: GM:AddGroupChat(TEAM_MOB, TEAM_GANG)

My code:

GM:AddGroupChat(TEAM_MOB1, TEAM_GANG1)

Gives an error on server start:

[ERROR] addons/darkrpmodification/lua/darkrp_customthings/groupchats.lua:18: attempt to index global ยดGMยด (a nil value)

Job Voting don't work

Hello if i vote for a job like Civil Protection then do it say vote created but it dont display to other players.

Random LUA errors from the modification addon

I can't seem to figure out the problem here. Every time I boot my server, it gives me this error:

[ERROR] addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:92: '}' expected to close '{' at line 89) near 'description'

  1. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/jobs.lua:0

I've made sure every job is opened and closed with a ')' and a '}', but the console still gives me this error and the jobs don't show up in game.. Help, please!
Jobs LUA File: https://www.dropbox.com/s/rpqqcsu1hxrnunq/jobs.lua

Please add mayor force changeclass back to citizen on death or not configuration option

A simple config option to display a message stating the mayor has been assassinated and force him to change back to citizen when the mayor is killed. This is such a common thing in RP i was surprised to find the script doesn't natively support mayor being changed to citizen on death. It's fairly easy to code myself and I will probably use the old block of code i had for it, but it'd be a great thing to have in as an option by default.

Disable the door system

I know their used to be a option in darkrp modification to remove the door system now i cant find it

Custom entities cause you to reach the limit for spawned custom entities when they are consumed

This is a huge issue for drug dealers spawning durgmod weed, or shop owners selling beer, etc. All I can do is make the limit very high.

Also, I'd like an option of some sort to make spawned entities removable with undo. This obviously doesn't make sense for things like drugs or food, but it does make sense if you want people to be able to spawn computers, etc, with the entity menu. Otherwise they can't remove them because removing world entities isn't allowed by prop protect and they can't physgun them because you can't physgun world entities either.

If there's a solution to these issues I'm missing, that's fine too. Is it upon me to add code specifically to entities to lower the player's /buy(thing) limit by one every time their piano or weed gets removed, or is it reasonable to want that coded in by default?

Police chief job added in Modification addon but doesn't appear in jobs list

That's about it. Even when playing as a cop.

Here's what my chief looks like:

TEAM_CHIEF = AddExtraTeam("Police Chief", {
color = Color(20, 20, 255, 255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[The Chief is the leader of the Civil Protection unit.
Coordinate the police force to enforce law in the city.
Hit a player with arrest baton to put them in jail.
Bash a player with a stunstick and they may learn to obey the law.
The Battering Ram can break down the door of a criminal, with a warrant for his/her arrest.
Type /wanted to alert the public to the presence of a criminal.
Type /jailpos to set the Jail Position]],
weapons = {"arrest_stick", "unarrest_stick", "weapon_negotiator", "stunstick", "door_ram", "weaponchecker"},
command = "chief",
max = 1,
salary = 75,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE,
help = {
"Please don't abuse your job",
"When you arrest someone they are auto transported to jail.",
"They are auto let out of jail after some time",
"Type /warrant [Nick|SteamID|Status ID] to set a search warrant for a player.",
"Type /wanted [Nick|SteamID|Status ID] to alert everyone to a wanted suspect",
"Type /unwanted [Nick|SteamID|Status ID] to clear the suspect",
"Type /jailpos to set the jail position"
}
})

[BUG] Modules not loading clientside

Files in DarkRPModification\lua\darkrp_modules\ isn't loading clientside.
Not even the examples (after removing the return).

In attempt to debug this I added a print to libraries/modificationloader.lua:54

if not file.IsDir(fol, "LUA") then print("NotFolder") return end

And it's printing in my client console.

Problem with job salary wont update "Joining/Connecting Team issue"

Hello Falco,

After some search about my issue and many test , i m thinking i have a problem about darkrpmod and plugins.
At joining , player get the model , the jobname , but not the salary ? when they change into a other job and comeback to citizen they get the "job salary".
The issue may due to "joining/connecting team". They join with the "Gamemode normal salary" and not the "job salary" comming from defaultjob
Do you know how can i procede to find what's going wrong ?

PS: I dont have "Derpinv" on server
I'll try already a clean up darkrp+darkrpmodification but the problem occurs again (normal salary at joining)

Thanks for your help and have a nice day

Translation issue

So as everyone misunderstood me in the latest issue, I will just upload some screenshots to show it and explain it AGAIN.

Screenshots:

  1. Serverstartup:

http://puu.sh/gJafW/a5239b7248.jpg

  1. Servermapchange:

http://puu.sh/gJa3X/278bd16633.jpg

My problem:
The translation of DarkRP via the DarkRPModification Addon doesnt take effect on Serverstartup.
However it only happens on my linux dedicated server.
After a mapchange it works perfectly.
Without a mapchange everything is in english with a exception of 10-20 things.
I removed my whole addons folder alot times to see if its my addons causing the error, but NO!

chatcommands translate inconvenience

This should be an easy fix I assume.

Example of issue:

Pasted 'darkrp_translateChatCommands' in console. ( without ' ' )

Output:
21 untranslated chat command descriptions!
text copied to clipboard!

After it copies the untranslated chat commands & you pasted them they add '\t' to each line.

Output:
["addagenda"]           =\t"Add a line of text to the agenda.",
["addmoney"]            =\t"Add money to a player's wallet.",
["admintell"]           =\t"Send a private, very intimidating message to someone.",
["admintellall"]        =\t"Send a very intimidating message to everyone.",
["arrest"]              =\t"Forcefully arrest a player.",
["forcecancelvote"]     =\t"Forcefully cancel a vote.",
["forcelock"]           =\t"Force the door you're looking at to be locked. This is saved.",
["forceown"]            =\t"Forcefully make someone own the door you're looking at.",
["forceremoveowner"]    =\t"Forcefully remove an owner from the door you're looking at.",
["forcerpname"]         =\t"Forcefully change a player's RP name",
["forceunlock"]         =\t"Force the door you're looking at to be unlocked. This is saved.",
["forceunown"]          =\t"Forcefully remove any owners from the door you're looking at.",
["forceunownall"]       =\t"Force a player to unown all the doors and vehicles they have.",
["freerpname"]          =\t"Remove a RP name from the database so a player can use it",
["resetlaws"]           =\t"Reset all laws.",
["setjailpos"]          =\t"Reset jail positions and create a new one at your position.",
["setlicense"]          =\t"Forcefully give a player a license.",
["setmoney"]            =\t"Set a player's wallet value.",
["setsalary"]           =\t"Set a player's salary.",
["unarrest"]            =\t"Forcefully unarrest a player.",
["unsetlicense"]        =\t"Forcefully revoke a player's license.",

!Isvalidgamemode

-needed to be placed at the darkRP instead of darkrpmodification page..-

sv.db is used and not my database

I have installed these files.
Now the sv.db continues to be used. But I want that my mysql-database is used for saving user data.

Door titles and money printer

People can not take money from money printers or see door titles in my server ever since i downloaded the hud this has happened but people can still own door if you a fix for this please tell also heres my hud tell me if i did anything wrong.

/*---------------------------------------------------------------------------
Which default HUD elements should be hidden?
---------------------------------------------------------------------------*/

surface.CreateFont( "namef", {
 font = "Bebas Neue",
 size = 24,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "namefsmall", {
 font = "Bebas Neue",
 size = 16,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "jobf", {
 font = "Bebas Neue",
 size = 34,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "jobfsmall", {
 font = "Bebas Neue",
 size = 24,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "jobfxsmall", {
 font = "Bebas Neue",
 size = 16,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "moneyf", {
 font = "Bebas Neue",
 size = 48,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "moneyfsmall", {
 font = "Bebas Neue",
 size = 36,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "salaryf", {
 font = "Bebas Neue",
 size = 24,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "healthf", {
 font = "Bebas Neue",
 size = 16,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "healthf2", {
 font = "Bebas Neue",
 size = 20,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "wantf", {
 font = "Bebas Neue",
 size = 36,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

surface.CreateFont( "hungerf", {
 font = "Bebas Neue",
 size = 18,
 weight = 500,
 blursize = 0,
 scanlines = 0,
 antialias = true
} )

local hideHUDElements = {
    -- if you DarkRP_HUD this to true, ALL of DarkRP's HUD will be disabled. That is the health bar and stuff,
    -- but also the agenda, the voice chat icons, lockdown text, player arrested text and the names above players' heads
    ["DarkRP_HUD"] = false,

    -- DarkRP_EntityDisplay is the text that is drawn above a player when you look at them.
    -- This also draws the information on doors and vehicles
    ["DarkRP_EntityDisplay"] = true,

    -- DarkRP_ZombieInfo draws information about zombies for admins who use /showzombie.
    ["DarkRP_ZombieInfo"] = false,

    -- This is the one you're most likely to replace first
    -- DarkRP_LocalPlayerHUD is the default HUD you see on the bottom left of the screen
    -- It shows your health, job, salary and wallet
    ["DarkRP_LocalPlayerHUD"] = true,

    -- Drawing the DarkRP agenda
    ["DarkRP_Agenda"] = true
}

-- this is the code that actually disables the drawing.
hook.Add("HUDShouldDraw", "HideDefaultDarkRPHud", function(name)
    if hideHUDElements[name] then return false end
end)

--if true then return end -- REMOVE THIS LINE TO ENABLE THE CUSTOM HUD BELOW

/*---------------------------------------------------------------------------
The Custom HUD
only draws health
---------------------------------------------------------------------------*/
local Health = 0

HM = {}

HM.UsingHungerMod = true

local av
local name

local oldName

local function DrawPlayerAvatar( p )

    oldName = LocalPlayer():Name()
    print( oldName )

    av = vgui.Create("AvatarImage")
    av:SetPos(64,ScrH() - 130)
    av:SetSize(56, 56)
    av:SetPlayer( p, 64 )
end

local function formatNumber(n)
    if not n then return "" end
    if n >= 1e14 then return tostring(n) end
    n = tostring(n)
    local sep = sep or ","
    local dp = string.find(n, "%.") or #n+1
    for i=dp-4, 1, -3 do
        n = n:sub(1, i) .. sep .. n:sub(i+1)
    end
    return n
end

local function hudPaint()

    draw.RoundedBox( 4, 9, ScrH() - 143, 392, 133, Color( 0, 0, 0, 255 ) )
    draw.RoundedBox( 4, 10, ScrH() - 142, 390, 132, Color( 38, 38, 38, 255 ) )
    draw.RoundedBoxEx( 4, 10, ScrH() - 142, 40, 80, Color( 54, 54, 54, 255 ), true, false, false, false )
    draw.RoundedBoxEx( 4, 400 - 156, ScrH() - 142, 156, 80, Color( 54, 54, 54, 255 ), false, true, false, false )

    surface.SetDrawColor( 0, 0, 0, 255 )
    surface.DrawLine( 10, ScrH() - 102, 50, ScrH() - 102 )

    surface.SetDrawColor( 61, 61, 61, 255 )
    surface.DrawLine( 10, ScrH() - 101, 50, ScrH() - 101 )

    surface.SetDrawColor( 4, 4, 4, 255 )
    surface.DrawLine( 10, ScrH() - 62, 400, ScrH() - 62 )

    surface.SetDrawColor( 61, 61, 61, 255 )
    surface.DrawLine( 10, ScrH() - 61, 400, ScrH() - 61 )

    surface.SetDrawColor( 84, 84, 84, 255 )
    surface.DrawLine( 11, ScrH() - 142, 398, ScrH() - 142 )

    surface.SetDrawColor( 24, 24, 24, 255 )
    surface.DrawLine( 400 - 156, ScrH() - 142, 400 - 156, ScrH() - 62 )

    surface.SetDrawColor( 24, 24, 24, 255 )
    surface.DrawLine( 50, ScrH() - 142, 50, ScrH() - 62 )

    local font

    surface.SetFont( "namef" )
    local PlayerName = LocalPlayer():Name()
    local Width, Height = surface.GetTextSize(PlayerName)
    if Width > 100 then
        font = "namefsmall"
    else
        font = "namef"
    end

    surface.SetFont( "namefsmall" )
    local wh, hw = surface.GetTextSize(PlayerName)
    if font == "namefsmall" and wh > 100 then
        PlayerName = string.sub( LocalPlayer():Name(), 1, 18 )..".."
    end

    if font == "namef" and Width < 100 then
        local PlayerName = LocalPlayer():Name()
    end

    draw.SimpleText( PlayerName, font, 130, ScrH() - 132, Color( 255, 255, 255 ) )

    local jfont
    local jof
    local eof

    surface.SetFont( "jobf" )
    local PlayerJob = team.GetName(LocalPlayer():Team())
    local wi, hi = surface.GetTextSize(PlayerJob)
    if wi > 100 and wi < 140 then
        jfont = "jobfsmall"
        jof = 2
    elseif wi > 140 then
        jfont = "jobfxsmall"
        jof = 4
    else
        jfont = "jobf"
        jof = 0
    end

    if jfont == "jobfsmall" and font == "namefsmall" then
        jof = jof - 4
    elseif jfont == "jobf" and font == "namefsmall" then
        jof = jof - 6
    elseif  jfont == "jobfxsmall" and font == "namefsmall" then
        jof = jof - 8
    else
        jof = jof
    end
    draw.SimpleText( PlayerJob, jfont, 130, ScrH() - 118 + jof, Color( 220, 220, 220, 255 ) )
    if HM.UsingHungerMod then
        draw.SimpleText( "Energy: "..math.Round(LocalPlayer():getDarkRPVar( "Energy" ) or 0), "hungerf", 130, ScrH() - 88 + jof, Color( 200, 200, 200, 255 ) )
    end

    local mfont

    surface.SetFont( "moneyf" )
    local PlayerMoney = formatNumber(LocalPlayer():getDarkRPVar( "money" ))
    local wl, hl = surface.GetTextSize(PlayerMoney)

    if wl > 140 then
        mfont = "moneyfsmall"
    else
        mfont = "moneyf"
    end

    draw.SimpleText( "$"..PlayerMoney, mfont, 320, ScrH() - 132, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER )
    draw.SimpleText( "Salary: $"..formatNumber(LocalPlayer():getDarkRPVar( "salary" )), "salaryf", 320, ScrH() - 96, Color( 200, 200, 200, 255 ), TEXT_ALIGN_CENTER )

    local x, y = 30, ScrH() - 20
    local localplayer = LocalPlayer()
    Health = math.min(100, (Health == localplayer:Health() and Health) or Lerp(0.1, Health, localplayer:Health()))

    local DrawHealth = math.Min(Health / GAMEMODE.Config.startinghealth, 1)
    local Border = math.Min(6, math.pow(2, math.Round(3*DrawHealth)))
    draw.RoundedBox(4, 20 + 60, y - 33, 309 - 7, 16, Color(0,0,0,200))
    if LocalPlayer():Health() > 0 then
        draw.RoundedBox(4, 21 + 60, y - 32, (309 - 9) * DrawHealth, 14, Color(255,40,40,180))
    end

    draw.DrawText(math.Max(0, math.Round(localplayer:Health())), "healthf", 302 / 2 + 80, y - 33, Color(255,255,255,200), 1, TEXT_ALIGN_CENTER)

    local armor = LocalPlayer():Armor()
    draw.RoundedBox(4, 20 + 60, ScrH() - 34, 302, 16, Color(0,0,0,200))
    if armor > 0 then
        draw.RoundedBox(4, 21 + 60, ScrH() - 33, armor * 3, 14, Color(40,40,255,255))
    end
    draw.SimpleText(armor, "healthf", 80 + 302 / 2, ScrH() - 33, Color(255,255,255,200), TEXT_ALIGN_CENTER)

    draw.SimpleText("Health:", "healthf2", 20, ScrH() - 54, Color(255,255,255,255), TEXT_ALIGN_LEFT)
    draw.SimpleText("Armor:", "healthf2", 20, ScrH() - 36, Color(255,255,255,255), TEXT_ALIGN_LEFT)

    if LocalPlayer():isWanted() then
        draw.SimpleText("!", "wantf", 30, ScrH() - 98, Color( math.sin( CurTime() * 3 ) * 255, 0, 0 ), TEXT_ALIGN_CENTER)
    else
        draw.SimpleText("!", "wantf", 30, ScrH() - 98, Color( 0, 0, 0, 255 ), TEXT_ALIGN_CENTER)
    end

    draw.SimpleText("+", "wantf", 30, ScrH() - 138, Color( 0, 0, 0, 255 ), TEXT_ALIGN_CENTER)

    if av then
        return
    else
        DrawPlayerAvatar( LocalPlayer() )
    end
end
hook.Add("HUDPaint", "DarkRP_Mod_HUDPaint", hudPaint)

Custom Jobs Error

My custom jobs use to work before my gamemode corrupted and after I updated the gamemode again my custom jobs don't work but my custom shipments and entities still work and so do my addons, what should I do? I followed the guidelines and they still don't work.

drop money on death is broke

Hello. drop money on death is set to false and deathfee is set to 0. but then my players still drop the money. please fix this because they drop all there money. or maybe there is another way to disable it?

Jobs are fully working in the F4 menu, but for some odd reason, Entities, Shipments and Ammo will not show up in the menu!

As I said the jobs work, but entities, shipments and ammo will not show up there, This only happened after Gmod update yesterday morning, the Entities can be spawned through direct command easily, and they work. The annoying bug makes it so that my players cant see the entities, shipments, and ammo. I checked up on console logs, no lua errors pertaining to anything... yet they still will not show up!

SetModel global problem (Pointshop and Custom functions)

Pointshop (SetModel trouble) conflict with lastest DarkRP version and my custom functions for setModel not working. (On DarkRP 2.4.3 all working perfect).

Example: If i use any playermodel in pointshop and rejoin to server then my custom playermodel not set. Gamemode set default job model or models. If i die or respawn Pointshop set my model to Custom.

And i have this problem with my custom functions.

Example 2:

function TestSetModel( ply )
timer.Simple(5, function()
ply:SetModel( "models/player/kleiner.mdl" )
end)
end
hook.Add( "PlayerSpawn", "TestSetModel", TestSetModel)

All troubles tested on clean server without addons, i use only clear DarkRP and Pointshop and Test lua with example 2, i trying use GM.Config.enforceplayermodel = false and this not helped.

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.