Garry's Mod

Garry's Mod

Defcon HUD [Customizable ingame]
62 Comments
Bonnish 14 Jun, 2024 @ 10:22pm 
i cant use the addon
[Defcon HUD [Customizable ingame]] lua/includes/extensions/net.lua:154: bad argument #1 to 'pairs' (table expected, got string)
1. pairs - [C]:-1
2. WriteTable - lua/includes/extensions/net.lua:154
3. DoClick - lua/autorun/client/cl_yc_defconhud.lua:1403
4. OnMouseReleased - lua/vgui/dlabel.lua:237
5. unknown - lua/vgui/dmenuoption.lua:77
craxe 17 Sep, 2023 @ 1:31am 
Is it possible do download the addon and customize it i will make sure to also give credits of the maker
starbuckcolin 25 May, 2022 @ 3:38pm 
I can't use the addon. It just gives me this error when I try to save it.
[Defcon HUD [Customizable ingame]] lua/includes/extensions/net.lua:111: bad argument #1 to 'pairs' (table expected, got string)
1. pairs - [C]:-1
2. WriteTable - lua/includes/extensions/net.lua:111
3. DoClick - lua/autorun/client/cl_yc_defconhud.lua:1403
4. OnMouseReleased - lua/vgui/dlabel.lua:237
5. unknown - lua/vgui/dmenuoption.lua:76
Gamer688 19 Nov, 2021 @ 12:07pm 
Can you add one option to change defcon to another name?
Zeekien 1 Nov, 2021 @ 6:46am 
thanks for the response yam! I will look into it! It would be awesome to implement as a feature XD
Yam  [author] 1 Nov, 2021 @ 4:48am 
@Azglie & @Gaz, In case you get this error, it means there is a conflict with an other addon.
The other addon might block the defcon system to load properly.

So please make sure to test addon one by one if needed.
Yam  [author] 1 Nov, 2021 @ 2:10am 
@Azglie & @Gaz
I've downloaded the addon and it works correctly. Can you guys explain me what you've done to get this ?

@ExlandLive, if you know a bit of lua and can extract the addon to edit it. You might find the code used for the init in "lua/autorun/server/sv_yc_defconhud.lua" and then at the block's code from line 441 to 456 is the right one. Change boolean values regarding the right defcon you want.
Otherwise, we will see if we can implement it into the configuration itself.
[RAT] I am shykio 23 Oct, 2021 @ 4:16pm 
the addon no longer works for me, it tells me like @Epsilon
Sloppinheimer 23 Oct, 2021 @ 3:05pm 
Getting this error whenever I try to save config in the defcon menu.

[Defcon HUD [Customizable ingame]] lua/includes/extensions/net.lua:103: bad argument #1 to 'pairs' (table expected, got string)
1. pairs - [C]:-1
2. WriteTable - lua/includes/extensions/net.lua:103
3. DoClick - lua/autorun/client/cl_yc_defconhud.lua:1403
4. OnMouseReleased - lua/vgui/dlabel.lua:237
5. unknown - lua/vgui/dmenuoption.lua:76

Zeekien 18 Oct, 2021 @ 7:29am 
Is it possible to change set the default level of DEFCON on server start and such. I would like it to start at 1 If possible! I believe it is as I saw you changed the defualt to 5 sometime last year Yam
Yam  [author] 12 Jun, 2021 @ 2:30am 
Hi @[FG] Raffi, i think it's possible but i'm not willing to publish an update on steam workshop to make it compatible with a gmodstore addon. Not anyone can have "EdgeHUD" and i do think it does need to stay the way it is, free access. Those compatibilities won't be free access.

We can maybe handle that in private later so you can have a custom version.
Yuma 8 Jun, 2021 @ 3:36am 
It is possible to integrate this into the EdgeHUD?
Yam  [author] 28 Oct, 2020 @ 1:39pm 
Hello @President N U T,

I highly doubt that the issue is coming from this addon, it does not conflict with "Ulx".
Anyway, i do hear you. You may have to do some tests first before making any conclusions like this.

Have you tried to use this mod alone with ulx on your server ? You might need to do so in order to target the real issue. I'm pretty sure that you will find out that it was coming from somewhere else.

I'm also a bit surprised as you've noticed some other person who downloaded haven't got any issue which makes me think again that it comes from your side.

"BUT", everything is possible and if you can't find any proper solution, i might be here to help you find out.

President N U T 27 Oct, 2020 @ 1:26pm 
Hello @Yam,

I am the head staff of our SCP RP server "Project Gladiator" with an issue, it appears that this mod has broken everything on our server, including ULX. This is a big issue which will only allow us to move around, do local chat, and noclip. Because of this, I ask that you could potentially help come up with a fix to this issue, any sort of potential assistance will be highly appreciated, thank you for your time.
Yam  [author] 12 Jul, 2020 @ 1:53am 
Hi @Jpbrandy,

It sounds like a conflict regarding chat commands. An other addon might be overriding stuff or block chat commands.

I've just tested it out and no issues on my hand.

You might need to isolate and find the addon responsible for this conflict by your own...
Think about what addon you've added since the problem appeared.
Jpbrandy 11 Jul, 2020 @ 8:39pm 
Hello @Yam,

My Imperial RP server seems to have an issue. If you don't mind aiding us that would be most appreciated. When we first added the addon to the server it worked great and as expected, but not too long ago it stopped working. Yet it's bizarre to me as to what is wrong since the DEFCONs are still displayed properly in the location I set them too and with all the configurations I set, but when I try to change the DEFCON it doesn't work nor does the admin command to open the configuration in-game. I've already tried swapping my rank to superadmin instead of a rank that inherits from superadmin only to receive the same result. I truly have no clue what the issue might be at this point and I've already done an entire reinstallation of the addon just to make sure to no avail. Any help would be greatly appreciated.
Yam  [author] 28 Apr, 2020 @ 9:46am 
This script doesn't use custom admin functions, so it might be compatible with any admin mode.

The only thing about rank restriction is who can access to the defcon menu config.
I'm using default gmod admin check functions :

IsAdmin [wiki.facepunch.com]
IsSuperAdmin [wiki.facepunch.com]

The question is more about, does serverguard use default gmod admin check functions ? i cannot answer that for you, need to ask the author.
Raid 27 Apr, 2020 @ 7:51pm 
Is this not compatible with serverguard?
Yam  [author] 27 Apr, 2020 @ 10:44am 
Hi @MiniLaguna,

I would advise you to read the last comments here, some people asked the same question and i have answered.

To sum up, you need to know the custom path sound (a sound that is download into the server through a content), then set the sound path into the config.

If you still can't manage it, come back to me and we will figure it out.
Yam  [author] 27 Apr, 2020 @ 10:42am 
Hi @Anonymous,

Config is ingame and accessible from the following chat command :

/defcon menu

#It was in the description though...
Blue Demon 27 Apr, 2020 @ 6:10am 
Hey @Yam
I have a question. me and a friend want to insert our own sound into defcon but we can’t find it out how.
Lost_Evo 27 Apr, 2020 @ 6:03am 
Where can I find the config?
Yam  [author] 19 Apr, 2020 @ 2:00pm 
Hi @SmittyHere,
I've got nothing to do with that.

I mean if you're currently unsubscribed to the addon then there is no reason you have it within your sandbox and so on.

The only possible reason is that you're subscribed to a custom content of a server which has included this addon into it, search for it and unsubscribe.

That's it, i can't do more. Don't blame me for the content you're subscribing to.
smitt 19 Apr, 2020 @ 1:45pm 
I played on a StarWars RP like once, now I can't get this thing off my sandbox
Yam  [author] 8 Jan, 2020 @ 1:05pm 
Hi @Mrkrebzz, sure thing.
It has been done in the last release.
Mrkrebzz 8 Jan, 2020 @ 11:07am 
Hi, love this addon. Is it possible to default the defcon system to 5? So on server restarts etc. it wouldn't be empty, it'd be set as 5?
Yam  [author] 11 Nov, 2019 @ 10:15pm 
Hi @Foxtrot, to be honest with you, i'm pretty sure it works.

It means there is something wrong either with your content pack or with the sound path you're putting into the menu.

Let's do an example :

__1. Upload content example __
I've subscribed to the following addon : https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=495762961

There is some vehicles sounds into it, i've took for example the following sound :
"sounds/vehicles/slave1_fly_loop.wav"

__2. Config it properly __

I've then put vehicles/slave1_fly_loop.wav into the config menu and SAVE it.

__3. When i change the defcon it plays the sound __

That's it for the example, hope you can manage it by yourself.
Foxtrot 11 Nov, 2019 @ 7:58am 
Hey Yam,

I followed your steps, to change the sound to costum sounds.
I have a Content Pack what inclued a sound.wav but it doesent work on the server.
Yam  [author] 13 Oct, 2019 @ 1:58pm 
Hi @Mr Oliver Fox McFuckNugget,
You can follow the following steps :
1. Upload sounds content on the workshop
You should upload a content including sounds in it.
For example upload a folder such as "content/sound/yoursound.wav".

2. Use the path of that content to fill the "defcon" config sound input
Copy paste it into the config menu.
If the path is correct it will be played at each level changes. Otherwise if you don't hear anything, it means the path is incorrect.
For example, if you've uploaded "content/sound/yoursound.wav" ==> the path will be "yoursound.wav"
If thats even the case, i have no idea
Hey Yam, im just curious about the custom sound thing, where do i put my sound effect in my server?
Just Scott 18 Jul, 2019 @ 4:03am 
Cheers Ill looking to that

Yam  [author] 17 Jul, 2019 @ 12:28am 
Hi, yes.
You need to know where you sounds files are located and then get the file path of the sound to copy paste it into the config menu.

If the path is correct it will be played at each level changes. Otherwise if you don't hear anything, it means the path is incorrect.

Process info : go to the main menu /defcon menu then go in the Hud main settings tab and change the "level sound path",don't forget to save.
Just Scott 16 Jul, 2019 @ 9:09pm 
Can we add custom sounds if running on a server?
Yam  [author] 2 Jul, 2019 @ 10:05am 
Hi, i do hear you. But like i've said in the last comment, i will implement that feature whenever i get the time to do that. It requires a lot of time.
ahnok 2 Jul, 2019 @ 6:42am 
This has probably been requested before but would you be able to add an option to add text to the defcons with for example instructions on what to do on which defcon level?
GoodNameHaHa 18 Jun, 2019 @ 11:31am 
@yam Thank you.
Yam  [author] 18 Jun, 2019 @ 11:31am 
Hi @GoodNameHaHa,
There are three people asking for that, i might think about doing it whenever i can.
GoodNameHaHa 18 Jun, 2019 @ 11:28am 
Has there been an addition for changeble text or will there be?
Shmeckels 16 May, 2019 @ 7:43pm 
Sent you a friend request to talk about the addon
Yam  [author] 27 Apr, 2019 @ 12:25pm 
#USSR Hi
I do not know your sounds location, you need to know where your sounds are located...
Usually that's somewhere in the sounds/ folder (in your scripts/addons and so on)

Once you've found them, copy paste the path into the config menu.
|_^USSR^_| 27 Apr, 2019 @ 12:18pm 
Where are these sounds located?
Yam  [author] 15 Apr, 2019 @ 10:49am 
#Nickolay
It might be a good idea, will try to implement it.
Nickolay 14 Apr, 2019 @ 7:07pm 
Would've been great if you added customizable text below the number.
Yam  [author] 23 Feb, 2019 @ 8:07am 
#USSR
if you've got already a sound ready then do the following steps :
1. /defcon menu
2. go to the "Main settings"
3. type the path of the sound you've got such as "mysounds/customsound.mp3"
4. save the config
|_^USSR^_| 23 Feb, 2019 @ 7:33am 
How can i do custom siren sound?
Yam  [author] 17 Feb, 2019 @ 10:32am 
#Axelion, pm me, we will see what we can do.
To add features, i need to feel that all of you guys want it.
For example, several people ask for colors customizations so i've added it.
Axelion 17 Feb, 2019 @ 10:16am 
#Yam are you able to add more feature like

Optional text under the defcon and can be edited?
Yam  [author] 17 Feb, 2019 @ 6:57am 
#Axelion
It has been fixed, you need to make your server mounting the addon again and refresh.
Or change the HUD design, it only happens with the "simple" design.
Let me know about it.
Axelion 17 Feb, 2019 @ 5:58am 
This happends when you enable the hud on hud main settings

[Defcon HUD [Customizable ingame]] lua/autorun/client/cl_yc_defconhud.lua:251: attempt to index global 'd_color' (a nil value)
1. fn - lua/autorun/client/cl_yc_defconhud.lua:251
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109