CUPack -- Official Release

Name: CUPack - Cow’s Useful Pack

Description: A serverside script pack for Garry’s Mod, makes adding scripts easy.

Created By: Chaotic Cow & Polly aka raBBish

Note: Yes I am “Chaotic Cow”

-Loads of useful/Fun Commands

-Use either “!” or “/” to start the command!

-Easy plugin creation {Easily make it admin only command, Easily give it a chat command without making the function look for it, Adds itself to command list, and etc.}

-Easy plugin deletion {Just delete the plugin you don’t want! When a plugin is deleted it removes itself from the command list}

-Send custom errors to chat {return “Sorry, only admins have access to that!”}

-Every command gets a Console Command { All ConCmds start with “cup” – Example: cup roll 9999 }

-Updates Via SVN

Plugins that come with the pack:
afk - Away From Keyboard
bhop - Hop like a bunny
burp - Buuuurrrppp!
chat - Chat with color! Example: /chat ^900 Hello! --Will Display Hello! in RED!–{RGB Scale is 0-9}
flip - Flip a coin!
credits - See a list of people who contributed!
setspawn - Set a custom spawn point!
resetspawn - Reset your spawn point!
roll - Roll a die and get a random interger!
dyk - Get a random Did You Know question!
dropwep - Drop the weapon you are holding!
explode - Explode yourself or others!
freeze - HALT! Freeze people in place!
sid - Get somebody’s steamid!
ghost - Ghost a prop!
help - Either display command list or information on a command!
boost - Break the sound barrier! Increase your sprint speed!
jboost - Achieve escape velocity! Increase jump velocity!
pos - Teleport to world position of your choice!
poslocal - Teleport to local position of your choice!
suicide - Die with some honor!
setmodel - Set your player model!
warp - Woosh! Teleport to where you are looking!
uptime - See how long the server has been up!
time - Get current time!
tent - Name a prop then teleport to it!
reload - Reload the plugins!

Deleting these plugins will break the addon!


** Bug Reporting & Contributing:**

Creating Plugins & Plugin Format:

Plugin Format:
[lua]CUPack:ChatPrint( ply, Color(255, 128, 0), “Text here”, Color(128,128,0), “More text”, etc. )
–Prints coloured text in player’s chat
–Almost the same syntax as with chat.AddText
–First argument can be either a single player or a table of players
CUPack:ConPrint( ply, “Text here” )
–Prints text in player’s console
–Either single player or a table

–Returns two values, first CUPack core revision, second plugin revision

–Giving an error in plugin:
return “Error text”

–Or to end without an error:
return “”[/lua]

Example Plugin:
[lua]local tyme = {} = “The Time” --Print name
tyme.cmd = “time” --Command (ie. “cup time” in console or “/time” in chat

tyme.adminsOnly = false --Are non-admins able to use this
tyme.reqArgs = 0 --Minimum amount of arguments = {} --Help text to be printed with help command[1] = “Displays current time!”[2] = “Usage: [!/]time”[3] = "Admins only: " … tostring(tyme.adminsOnly) … ", required arguments: " … tyme.reqArgs

–Function to be called
function tyme.Function(ply, args)
CUPack:ChatPrint(player.GetAll(), Color(255,255,0),“The time is %I:%M:%S %p”) )

–Adds the table in plugins

Example plugin using targeting helper:
local sid = {} = “Get SteamID”
sid.cmd = “sid”

sid.adminsOnly = false
sid.reqArgs = 1

sid.needTarget = true --If true, the function will have a third argument, target = {}[1] = “Gets SteamID of given player!”[2] = “Usage: [!/]sid <name>”[3] = "Admins only: " … tostring(sid.adminsOnly) … ", required arguments: " … sid.reqArgs

–Still the function to be called
function sid.Function(ply, args, target)
–Third argument is the player found with text someone typed
–Example: “/sid pol” would find someone named Polly
–"/sid @me" targets the caller

local sid = target:SteamID()
local name = target:GetName()

if sid != "" then  
	CUPack:ChatPrint(ply, name.."'s SteamID is : "..sid)



Example using restricted gamemode access for commands:
local dropwep = {} = “Drop Weapon”
dropwep.cmd = “dropwep”

dropwep.adminsOnly = false
dropwep.reqArgs = 0

–Allows command to be only used in Gamemodes choosen!
– In this example this command can only be used in Sandbox or darkRP
–You can add as many gamemodes as you like.
– Remove it completely to allow all Gamemodes! = {“sandbox”,“darkrp”} = {}[1] = “Buttery Fingers! Drop your current weapon!”[2] = “Usage: [!/]dropwep”[3] = "Admins only: " … tostring(dropwep.adminsOnly) … ", required arguments: " … dropwep.reqArgs

function dropwep.Function(ply, args)
local wep = ply:GetActiveWeapon():GetClass()
CUPack:ChatPrint(ply, Color(100, 255, 50, 255), "You dropped your ",Color(255, 100, 50, 255), wep, “!”)
if (ply:GetActiveWeapon():IsValid()) then

** Adding a Hook:**
local notify = {}

–This is used as hook ID = “Spawn Notify”

notify.cmd = “notify”
–Hook name here
notify.hook = “PlayerInitialSpawn”

–Function the hook calls
function notify.Function(ply)
CUPack:ChatPrint(ply, Color(0,255,0,255), "Hi! Welcome to ", Color(255,0,0,255), GetHostName(), “!”)

CUPack:ChatPrint(ply, Color(0,255,0,255), "The server's gamemode is ", Color(255,0,0,255),GAMEMODE.Name,"!")

CUPack:ChatPrint( ply, Color(0,255,155,255), "Type [!/]help for information and a list of the commands!" )

–Adds the hook in CUPack tables


Special Thanks To:
For letting us use their server for testing purposes.

Does this conflict with NewAdmin? (Just wondering and If it does’nt then… GREAT!)

Btw good job. It looks really good :D.

No it does not.


If a server has NewAdmin you have to use “/” and not “!” because NewAdmin won’t let people use commands starting with “!” unless it’s part of NewAdmin.

Just to let everyone know. I updated CUPack. Fixed a few typos and stuff. Nothing Major.

So I Uploaded the new version onto GMOD.ORG

I dont get it. So is it like a admin mod? Or what

No. It’s an addon with a bunch of mini-scripts.

It allows easy way to add a script to a server with lots of options.

Like: Gamemode Only, Admin Only ,etc.