Created
August 2, 2015 07:10
-
-
Save sigsegv-mvm/fd1b4f09c3bfb438dab6 to your computer and use it in GitHub Desktop.
SourceMod plugin for detecting when players have conditions added/removed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sourcemod> | |
#include <sdktools> | |
#include <sdkhooks> | |
#include <tf2> | |
public OnPluginStart() | |
{ | |
PrintToServer("sigsegv's addcond/removecond detector"); | |
} | |
public TF2_OnConditionAdded(client, TFCond:condition) | |
{ | |
decl String:name[MAX_NAME_LENGTH]; | |
GetClientName(client, name, sizeof(name)); | |
// if (strcmp(name, "sigsegv") != 0) { | |
// return; | |
// } | |
PrintToChatAll("[%.3f] %s (#%d): ADDCOND %d", GetGameTime(), name, client, condition); | |
} | |
public TF2_OnConditionRemoved(client, TFCond:condition) | |
{ | |
decl String:name[MAX_NAME_LENGTH]; | |
GetClientName(client, name, sizeof(name)); | |
// if (strcmp(name, "sigsegv") != 0) { | |
// return; | |
// } | |
PrintToChatAll("[%.3f] %s (#%d): REMOVECOND %d", GetGameTime(), name, client, condition); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment