There’s even a plugin for betting on the results of the round :-).
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. Would you like players to shoot chickens instead of bullets, like in Crysis Warhead? No problem. True, “Hello, World!” is nothing earth-shattering, but it’s only the beginning. Then start the server and enjoy seeing your message “Hello, World!” in the server console.
Take the compiled file and move it to the addons/sourcemod/plugins folder. To combine it all together, I’ll use a web tool created by Asher „asherkin“ Baker, one of the creators of SourceMod. If you want more information, check out the SourceMod wiki and tutorial.
Because this article is only a brief introduction, I’ll show you how to print “Hello, world!” as an example. You also must learn the SourcePawn programming language, a derivation of Pawn. 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. Mostly because I needed them.Ĭreating your own SourceMod plugin is easy. I also created several libraries along the way. In time, I made my way up to a large, modular plugin, consisting of several plugins working together. Then, I continued with more difficult plugins, like the VIP membership management plugin, consisting of a web part and a database. For example, a score screen at the end of a round. Everything was open-source, and we gathered at the web forum AlliedModders, where we helped each other out. Furthermore, I was completely astonished by the SourceMod community. SourceMod, for which I created plugins, is also a plugin for Source engine. So, the benefit is clear: the gamer installs the game and the game gets modified based on the server it connects to. And that’s the difference, compared to client-side plugins/modifications. All that gamers need to do is to connect to a specially-modified server. Why server-side plugins? Server-side plugins/modifications are exactly that – server-side. 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. My first attempts at server-side plugins were laughable at best. And, ever since, I’ve wanted to know what’s down the rabbit hole.Ĭounter-Strike: Source runs on Source engine, which is very modder-friendly (a ‘modder’ is a person who modifies or creates new content). Creating maps was the red pill that took me into the Wonderland. SetHudTextParams(-1.0, 0.2, 5.0, displa圜olor, displa圜olor, displa圜olor, 255, 2, 0.5, 0.02, 0.As countless others who have ever played Counter-Strike, I also wanted to create my own map: the environment where the game takes place. Set up the hud text and use the default or user inputed color If (StrEqual(color_name, g_ColorNames, false)) Loop through all the colors and see if the color_name argument matchesįor (int color = 0 color < COLOR_COUNT color++) Default to color white, if no color is found GetCmdArg(1, color_name, sizeof(color_name)) Public Action Command_XSay(int client, int args)Ĭhar color_name // Get the colour name in the first argument RegAdminCmd("sm_xsay", Command_XSay, ADMFLAG_CHAT, "sm_xsay - sends game text message at the top of mid to all players") G_hSynchronizer = CreateHudSynchronizer() Description = "Admin messages using game_text entity",