An extension for SourceMod that exposes hooks to IServerGameDLL::Think for plugins to use.
You probably were redirected here when trying to install a plugin, so let's be quick.
Make sure your server is running a version of sourcemod equal or higher than 1.8
- Go to the releases section.
- Look for the latest post and download the attched zip file for your platform (eg.
think_hooks-nX-linux.zipfor Linux). - Drag and drop the contents from the file to your
sourcemodfolder. - Done, load or reload any plugins that need this extension to work, they should ask SourceMod to load the extension for you.
This extension provides hooks to IServerGameDLL::Think and exposes them via functions that behave similarly to OnGameFrame and RequestFrame, the only difference is that the ones that this extension provides (OnServerThink and RequestThink) are called even when the server is not generating frames (hibernating), this is specially useful when writing plugins that use forwards triggered by networking events, because these can happen even if the server is on the main game loop or not, and you need to make sure actions are being performed.
- Download the include
think_hooks.inc - Place it on your
includefolder #include "think_hooks.inc"from your script
Now you are ready to use OnServerThink and RequestThink, remember that documentation about these symbols can be found on think_hooks.inc, they are documented using doxygen-like comments, just like all of the sourcemod API. Remember to redirect the end user to this page every time you publish a project that utilizes this extension.
Fork this repo and issue a pull request.
Open a new issue and descibe your request (include as much information as possible).