Addon Entry

Now supporting the newest garrysmods.org

New : UserScript to add a search button to any garrysmod.org download page Script Page Install It!

Mirrors

Mirror 1 - Show

File: Vladi's MediGun
Version: None
Garrysmod.org URL: http://www.garrysmod.org/downloads/?a=view&id=117180
Description: So I spent my evening getting re-acquainted with Lua, and this is the fruit of my labors.

It's a MediGun:
-Auto-recharges over time
-Uses "custom" ammo (HelicopterGun ammo type, language.Add'd the fuck up)
-Left click to heal target by however much "charge" is contained within the primary battery
-Reload when you have 20 charge in the battery to "store" the battery for later use; up to 3 batteries may be stored at a time
-Right click to heal target for 20 (from stored battery)

NOTE: It uses the AR2 model, but only affects targets within melee range (think: if you can crowbar them, you can heal them)

Small parts of this are borrowed from other locations, including the DarkRP medkit (yeah, I'm a dirty cheater, aren't I?), but for the most part, it's my own code.

Please, let me know if there are any bugs you come across. The gun itself is quite simple, so you probably won't unless you have a conflicting addon.

Note to experienced Lua coders:
The way I handle storing batteries may cause you to gag; you've been warned.

***SELF-HEALING VERSION ON TOYBOX HAS A FEW ISSUES THAT I DON'T KNOW HOW TO FIX BECAUSE THEY DON'T CAUSE ERRORS***

Image: Vladi's