As is the case with many of my peers, I also grew up playing computer games. Today, I’ll talk mainly about server modifications for the legendary game Counter-Strike: Source. Read on and immerse yourself in a world where anything and everything is possible.
SourceMod plugins – create your own zombies in Counter-Strike: Source
As countless others who have ever played Counter-Strike, I also wanted to create my own map: the environment where the game takes place. Creating maps was the red pill that took me into the Wonderland. And, ever since, I’ve wanted to know what’s down the rabbit hole.
Counter-Strike: Source runs on Source engine, which is very modder-friendly (a ‘modder’ is a person who modifies or creates new content). My first attempts at server-side plugins were laughable at best. Fortunately, I was an admin of a few CS:S servers at the time, so I had a lot of room for development and testing.
Why server-side plugins? Server-side plugins/modifications are exactly that – server-side. There’s no need to install anything. All that gamers need to do is to connect to a specially-modified server. And that’s the difference, compared to client-side plugins/modifications. So, the benefit is clear: the gamer installs the game and the game gets modified based on the server it connects to.
SourceMod, for which I created plugins, is also a plugin for Source engine. Furthermore, I was completely astonished by the SourceMod community. Everything was open-source, and we gathered at the web forum AlliedModders, where we helped each other out.
I started with small plugins. For example, a score screen at the end of a round. Then, I continued with more difficult plugins, like the VIP membership management plugin, consisting of a web part and a database. In time, I made my way up to a large, modular plugin, consisting of several plugins working together. I also created several libraries along the way. Mostly because I needed them.
Creating your own SourceMod plugin is easy. All you need is an idea, willpower, a CS:S server, and then you can create practically anything you can encounter on CS:S servers. You also must learn the SourcePawn programming language, a derivation of Pawn. Because this article is only a brief introduction, I’ll show you how to print “Hello, world!” as an example. If you want more information, check out the SourceMod wiki and tutorial. To combine it all together, I’ll use a web tool created by Asher „asherkin“ Baker, one of the creators of SourceMod.
#include <sourcemod> public Plugin myinfo = { name = "My first plugin", author = "Prema", description = "Greetings to the world", version = "1.0.0", url = "www.eman.cz" }; public void OnPluginStart() { PrintToServer("Hello, World!"); }
Take the compiled file and move it to the addons/sourcemod/plugins folder. Then start the server and enjoy seeing your message “Hello, World!” in the server console. It’s quite simple, isn’t it?
True, “Hello, World!” is nothing earth-shattering, but it’s only the beginning. Would you like players to shoot chickens instead of bullets, like in Crysis Warhead? No problem. You want to “reward” a player with a zero-g state? Just do it! Do you like rainbows and consider coloring a different player every second with a different color as fun? What a great idea! Or, how about creating a modification that turns one player into a zombie at the beginning of the round, and then that zombie has to touch other players to spread the disease, while the other players are running all over a huge map, trying to avoid the zombie by any means necessary? Well, even this mod exists. There’s even a plugin for betting on the results of the round :-). The sky is the limit.
I believe that modifications are the reason why Counter-Strike: Source has survived for over fourteen years and keeps going. It’s amazing that you can buy one game and be able to play around with so many different modifications, without the need for additional installations. And that’s something you don’t often see with modern games (excluding Counter-Strike: Global Offensive, of course). The choice is yours – would you like to try the red pill?
Header photo: Counter-Strike: Source. Source: Valve Corporation & Turtle Rock Studios.
Přemysl Talich