Garry's Mod

Garry's Mod

Not enough ratings
HL2+ Supplies tool
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
172.693 KB
28 Sep @ 7:17am
3 Oct @ 2:57pm
2 Change Notes ( view )

Subscribe to download
HL2+ Supplies tool

Description
"Little customization ain't gonna hurt nobody"

Description
Tool that allows to create custom HL2-ish supply entities (supply boxes, chargers and ammo crates). You can choose amount of ammo (for each added ammotype), health and armor to give, with additional options of desired model, sound on pickup and few player interaction options (allow use only on E, enable collision on entity)

Compatible with duplicator and default tool template panel, but with little nuisance coming from the way this entity works (see below for technical explanation). Superadmin can manipulate the ammo table, defining what ammo can be given and maximum for it (or disable limits altogether)

Technicalities
To explain how it works, imagine client set amounts from the list as string "0 0 120 0 30" for example. This string is sent to the entity when created, and entity then goes through each number and compares it to server table values, so following example it'll be "id 1 amount 0, id 2 amount 0, id 3 amount 120 ..."

That said, this approach creates a dependence of clients from server table entries amount. Recommendation - don't delete entries, but set them to zero instead so they won't be given.

Also, admin controls aren't designed for permanent change, so if you're server owner - change autorun tables instead if you want to change default server table values.

Todo:
- idk anymore some random ♥♥♥♥ i guess
- Maybe Wiremod support? idk about that yet most certainly not, as of now premise shifted to adding placeholder functions that do nothing by itself, but can be overriden if entity is used as a base

Terms of usage
1. You're free to use, modify, patch and take parts of code with no restrictions, as long as it's not for non-commercial purposes
2. You're allowed to publish anything following first term if your publication is significant addition.
3. You don't have to ask my permission for anything, be respectful and give credit if you used my work
4. I reserve my right to add/update features in any direction i desire

Little disclaimer
There's not enough testing in terms of edge-cases and conflicts. Although the latter shouldn't be a concern, only for WManip or something like that, still - feel free to report on any errors, conflicts and bugs

Links
Discord Server[discord.gg]
Boosty[boosty.to]
2 Comments
God's drunkest driver  [author] 29 Sep @ 1:37pm 
:steamhappy:
Hamakaze 29 Sep @ 12:49pm 
:steamhappy: