Garry's Mod

Garry's Mod

Ocen: 4,270
Mystery Box Entity (Sandbox/TTT) (2023 Update)
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Content Type: Addon
Addon Type: Entity
Addon Tags: Fun, Roleplay
Rozmiar pliku
Zamieszczono
Zaktualizowano
10.545 MB
5 maja 2014 o 20:30
6 kwietnia 2023 o 14:38
Listy zmian: 26 ( zobacz )

Zasubskrybuj, aby pobrać
Mystery Box Entity (Sandbox/TTT) (2023 Update)

Opis
If you have any questions/comments/concerns, feel free to ask!

Overview
This is a working CoD Zombies Mystery Box entity for GMOD.

Usage

To use it, go to the "CoD Zombies" tab in the entities window on the spawn menu. Spawn one, press "E" (by default). The weapon will then start cycling.

TTT Usage

The addon comes with a built in TTT weapon, "weapon_hoff_mysterybox". This will allow you to spawn one in. Comes with a T menu icon as well.

Please note: class names in TTT are different than in sandbox and other gamemodes, so please read the config section and change accordingly before usage.

To make the box work once, add the convar 'MysteryBox_MaxSpins 1' in your server.cfg file. This will make it work once.

Config

NOTE: IF YOU DON'T HAVE A TXT CONFIG FILE, SPAWN A BOX IN AND IT WILL BE CREATED.

If you're an admin on a server or a single player user, you can configure what shows up in the mystery box via the Utilities menu. Spawning a box creates a txt config file which lets you set the weapons in the box, in garrysmod/garrysmod/data/codzombies/mysterybox.txt. The config looks like this:
http://pastebin.com/raw/21i3cLDV

You can right click on any weapon on your spawn list, and click 'Copy To Clipboard' to copy the weapon class. You can then paste it in the config dropdown, or the text file directly.

Config Video Tutorial
https://www.youtube.com/watch?v=AOxQBoop1rk&feature=youtu.be
Here's the alternate way to configure the box. I explain how to add weapon classes directly to the .txt file


Please do not use regular notepad, use notepad++ or Sublime Text.

Server owners can use "resource.AddWorkshop("256934412") to download files to clients

Very FAQ

Q. I'm getting the crowbar error! When I use the box I got an error and my weapons don't show up and only a crowbar appears.
A. Here are the two possible causes:
1) The config is incorrect
2) The weapon class doesn't contain an swep table/SWEP.WorldModel value in it. This means the box can't grab a model to display in the box.

Q: How do I limit the amount of spins a player can do before it leaves?
A: Use the cvar MysteryBox_MaxSpins <count>

Q: How do I make some weapons more common than others?
A: Just put the weapon class in the config multiple times and it'll cycle to that more often

Q: Can I change something in the code and reupload my own version?
A: No. The code is my own and thus protected under copyright.

Enjoy
Hoff
Popularne dyskusje Zobacz wszystkie (27)
26
11 lutego 2021 o 7:23
Coding for an M9K gun.
The_WRX_Fox
1
20 listopada 2023 o 16:59
Help with implementing this into TTT
Chaotiplex
21
25 grudnia 2017 o 12:59
Still not working! please help me
VeryBigMan
Komentarzy: 803
EK21 15 stycznia o 16:17 
any way that i / you can make the name of the weapon appear before taking it?
Hoff  [autor] 29 października 2023 o 7:56 
Yeah it works with most weapon addons
Christian goose 27 października 2023 o 10:35 
I have a question does it work for other mods??
Palestinian Bird 26 sierpnia 2023 o 7:03 
can you plz jus make it choose by default a random weapon from your entire game except admin guns.
homer 19 czerwca 2023 o 21:22 
when i spawn the mystery box it always be invisible
zombierun 13 czerwca 2023 o 22:42 
i was looking for this thanks man
JJoestar 8 maja 2023 o 11:39 
Can you make nmoney 2 compatible to spent money and open the box pls
StickMan 7 maja 2023 o 19:38 
Can we make a DarkRP based one that costs money to open?
Hoff  [autor] 7 maja 2023 o 18:40 
The steam workshop should auto update the old one, did you manually extract it separately?
Jpr0ductionz 7 maja 2023 o 17:42 
I still have the old version of the box, and I can't find it in my mods to remove it. Really need serious help.