Garry's Mod

Garry's Mod

3,939 ratings
Mystery Box Entity
   
Award
Favorite
Favorited
Unfavorite
Type: Weapon, Addon
Tags: Fun, Roleplay
File Size
Posted
Updated
7.221 MB
May 5, 2014 @ 8:30pm
Aug 10, 2016 @ 1:03pm
13 Change Notes ( view )

Subscribe to download
Mystery Box Entity

Description
If you have any questions/comments/concerns, feel free to ask or join my steam group: http://steamcommunity.com/groups/hoffsaddons

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

Config Video Tutorial
https://www.youtube.com/watch?v=AOxQBoop1rk&feature=youtu.be
Here's the easiest (and only) way to config the box. I explain how to add weapons you want to the box.

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


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_infinite "0" in your server.cfg file. This will make it work once.

Config

If you're an admin on a server or a single player user, you can configure what shows up in the mystery box. It 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

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.

This is my first workshop addon, so hopefully it works ok. If you have any suggestions please let me know.

Enjoy
Hoff

[www.paypal.com]
Popular Discussions View All (25)
25
Sep 20, 2017 @ 7:15am
Coding for an M9K gun.
The_WRX_Fox
21
Dec 25, 2017 @ 12:59pm
Still not working! please help me
Very Big Man
3
Oct 18, 2020 @ 5:24am
NEED HELP NOT WORKING!
Dettren
< >
744 Comments
SansToad Nov 30, 2020 @ 11:20pm 
it sure does.
SansToad Nov 30, 2020 @ 11:17pm 
does textedit work?
BoBearings Nov 25, 2020 @ 2:39pm 
Does a weapon's placement in the config effect the chance of pulling it from the box?
Lcaponpon Nov 17, 2020 @ 9:21pm 
can you add arccw
Racon123ACA Oct 29, 2020 @ 2:16pm 
how do you make it need money?
the master cow Oct 16, 2020 @ 12:49pm 
i use windows 7 tutorial does not help
boyer_kathleen123 Sep 27, 2020 @ 9:05am 
how can we know the weapon name?
CoreGranade Aug 3, 2020 @ 1:32pm 
the ajhoff something file does not exist for me...
Jefe Maestro Jul 22, 2020 @ 7:13am 
I'm getting this error

[Mystery Box Entity] lua/entities/zombies_box_weapon/init.lua:169: attempt to index local 'weaponGet' (a nil value)
1. SwitchWeapon - lua/entities/zombies_box_weapon/init.lua:169
2. unknown - lua/entities/zombies_box_weapon/init.lua:202

Timer Failed! [CycleWeps55][@lua/entities/zombies_box_weapon/init.lua (line 193)]
JiMMYXL_1223_N3 May 27, 2020 @ 9:50am 
make ray gun swep