ANDREW'S GARRYSMOD LUA SCRIPTS

Home

This page contains many scripts I made for a game called GarrysMod (GMod) . You must purchase GarrysMod to use these scripts. These scripts are written in Lua using custom syntax, functions, and variables built into GMod.
<SSS> - Administration Mod
Download:

lua_download.png

Created:
June 23, 2007
Changelog:
23/June/2007 - Rewrote entire mod from scratch. Added stable addons system, chat commands, admin system, chat system, scrolling adverts HUD...
Description:
This was a personal server addon I made to make running a server like my old one easier. This addon currently contains many of my custom Lua libraries and addons but is still incomplete.

List of addons:
Admin - My admin system. This allows admins to add another admin ingame without restarting the level, map, etc. This addon is a big part of the <SSS> Mod.
AntiSpam - I am not really sure if I ever completed this addon but it is supposed to prevent players from spamming props, effects, npcs, chat, etc.
BannedNames - An addon that allows admins to ban certain names. (Incomplete, this was really just made to prevent people from using my name, Console, etc.)
BannedProps - An old addon that allows admins to ban props from being spawned.
Bug - Report bugs to admins.
Chat - Completely redesigned chat area.
Exploit - Report exploits to admins.
ExtendedLanguage - #worldspawn to worldspawn, etc.
FadingSpawnEffect - Players fade in as they spawn.
God - God Mode.
Ignite - Admins can ignite players.
Issues - Report server issues to admins.
MainHUD - Server HUD (Off by default, replaced with text scroller bar)
MapChanger - Changes map to the nextmap once all players have left the server. (untested)
ModelResizing - Players can resize models.
PlayerNames - Display players' names above their head.
PlayerPickup - Admins can pickup players.
RCON - RCON system for admins.
ReserverSlot - Reserves a slot for admins.
ServerLogger - Creates logs of player's chatting, spawning, dieing, etc.
Slap - Admins can slap players.
Slay - Admins can slay players.

Installation Type:
Addon - Drop into addons folder
A Fish
gm_construct0001.png gm_construct0002.png
Download:

image

Created:
22nd July 2007
Changelog:
22nd July 2007 - Fixed poorly quickly coded X axis and Y axis movement that prevented the fish to move in any more than two directions.
This actually got hundreds of downloads off of facepunch at the time i released it. The download link and thread link seem to be old and dead by now but if anyone cares for a reupload let me know.
Description:
I made some fish.
You can spawn them anywhere you'd like. Just remember that fish need water to swim in (and survive).
These fish have some basic AI. They know to turn if they hit something. They are able to move around well in the water. It's also funny watching them leap around on land while they try to find their way back to the water.
I couldn't find any other fish models besides the ones that come with Counter-Strike: Source. So that means those of you who don't own Counter-Strike: Source will have to find some other way of getting the models, or you can just simple choose different ones by changing the ENT.Models variable in the init.lua file.
You can edit these couple of lines in the init.lua file if you find that the fish swim too fast or you want to use different models:

ENT.LifeTimeOutOfWater = 5 // The amount of time a fish can last without water (in seconds)
ENT.Depth = 15 // How deep a fish is swimming (source units?)
ENT.SwimSpeed = 3 // Self explanatory
ENT.Models = {
"models/props/cs_militia/fishriver01.mdl",
"models/props/de_inferno/GoldFish.mdl"
}

I couldn't find any other fish models besides the ones that come with Counter-Strike: Source. So that means those of you who don't own Counter-Strike: Source will have to find some other way of getting the models, or you can just simple choose different ones by changing the ENT.Models variable in the init.lua file.
FacePunchStudios forums thread:
http://forums.facepunchstudios.com/showthread.php?t=383491

Installation Type:
Drop into garrysmod folder.
Beacon Tool
gm_construct0007.png gm_construct0008.png
Download:

lua_download.png

Created:
29th July 2007
Changelog:
29th July 2007 - Version 1
Description:
This was just one little stool I made and hadn't released. It spawns a 'beacon' that emits a sound and/or a signal effect with a certain radius. The control panel contains options for radius, model, sound, color, and delay.

Installation Type:
Addon - Drop into addons folder
Bomb Tool
gm_construct0004.png gm_construct0005.png
Download:

lua_download.png

Created:
29th July 2007
Changelog:
29th July 2007 - Added fade-to-red effect before the bomb explodes
28th July 2007 - Version 1
Description:
This was another stool I made and hadn't released. It spawns a bomb entity and becomes a darker red color before it finally explodes. The control panel contains options for radius, model, damage, and delay.

Installation Type:
Addon - Drop into addons folder
HL2 SENTS
Download:

lua_download.png

Created:
30th July 2007
Changelog:
30th July 2007 - Added "ammobox"
29th July 2007 - Version 1
Description:
The Half-Life 2 AmmoBox and ItemBox Lua style. Simple script that spawns those entities and adds them to the sent's tab.

Installation Type:
Addon - Drop into addons folder
Hot Potato SENT
Download:

lua_download.png

Created:
14th June 2007
Changelog:
14th June 2007 - Version 1
Description:
A friend had requested a "hot potato" entity. Player 1 spawns the entity and can gravgun/crowbar it to another player. If the timer runs out and a player is holding the hot potato, that player loses. If the potato hits the ground, the player who throw it down there loses. Kind of a messy, uncommented script... I wrote it in like 5 minutes.

Installation Type:
SENT - drop in lua/entities folder
Tomato SWEP
Download:

lua_download.png

Created:
14th August 2007
Changelog:
14th August 2007 - added crappy exploding tomato effect
13th August 2007 - hexed the bugbait model and added my "tomato" material
10th August 2007 - Version 1
Description:
Requested by a friend. I made this into a good model hexing and project for the tomato/bugbait model. The toughest part was learning how to run animations with the swep in lua, loop them correctly, and start/stop them at the right times.

Installation Type:
Addon - Drop in addons folder
SteamIDs
Download:

lua_download.png

Created:
26th August 2007
Changelog:
24th August 2007 - Added function to send file to clients no matter what the name of the file is.
23th August 2007 - Version 1
Description:
A friend requested this for his server. It's a basic send-players-data (through usermessages) script. It makes the Player:SteamID() function available clientside (But only if the server has this file). It also includes a function to use when posting a script on an internet forum, pastebin, etc and a downloader does not know what to name it. As long as it is named something with a .lua extension it will be sent to clients.
XYZ Axis Beams
gm_construct0009.png gm_construct0012.png gm_construct0014.png
Download:

lua_download.png

Created:
24th September 2007
Changelog:
24th September 2007 - Version 1
Description:
Type XYZ in console while looking at a prop to draw the x, y, and z axes of that prop. This script is clientside and works on any unprotected server.

Installation Type:
Addon - Drop in addons folder
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
Valid XHTML 1.0 Strict Valid CSS!