Metamod Source Game Event listening

05 October, 2016

A small explanation on how to listen to game events. This example is made for CS:GO, but will work on other Source based games too (some event names may be different). The example is meant for class based plugins. So if you are creating static functions you'll have to do things a little bit different.

Golang mgo append to a nested array in a document

24 May, 2016

Small tutorial on how to add/push/append a new element to an array/list inside a document, based on my previous post.

Golang mgo retrieve nested structured arrays

24 May, 2016

Small tutorial on how to retrieve nested arrays/lists from a 'mgo.Find()' result.

Golang mgo findAndModify auto increment id tutorial

17 May, 2016

Here is a brief explanation for the 'findAndModify()' equivalent for mgo. Instead of 'findAndModify()' we will use 'mgo.Find().Apply()'. I will demonstrate how to use auto incremented ids instead of random unique generated IDs for documents, since mongdb does not have a native way of doing this (because MongoDB is not a relational database).

It work's like this, we create a collection, insert a document in that collection that contains the last generated ID. Every time we call 'findAndModify()', mongoDB will increment the value and we get that new value back, which you should use to insert a new document with.

Metamod:Source C++ server hibernation hooking

04 May, 2016

If you are in need of hooking into a continuous loop of a source dedicated server, for rejoining a thread for example, you cannot rely on the "GameFrame" loop, because it will simply stop looping if there are no clients connected to the server. So in that case you will need to hook into "Think" which loops both in hibernation mode and when a client is connected ("GameFrame").

Writing Counter Strike Global Offensive server C++ plugins

28 April, 2016

You probably came across valve developers wiki's page "Server plugins" that contains very outdated information, and actually not compatible with CSGO servers (you can't even compile their own Sample). Although there is a SDK for CSGO, it's also outdated and totally undocumented. Luckily there is a third party SDK that works wonderfully and has much more functionality and is pretty much the only way to create native plugins, and you should use this SDK. This guide is based for Windows platforms, and just to get you started.

Golang hash sum and checksum to string tutorial and examples

17 April, 2016

The output of the function "hash.Sum()" is generated in byte code, and the output of "Checksum()" is a unsigned integer.

Generate CRC32 hash of a file in Golang turorial

17 April, 2016

In previous posts I showed how to make a MD5 hash and a SHA1 hash of a file, generating a CRC checksum on a file is however a bit more complicated since it uses a polynomial table. I'll explain everything in depth.

Generate SHA1 hash of a file in Golang example

08 April, 2016

This function is based on my previous post but adapted for the SHA1 algorithm.

Home