Last active
November 24, 2016 10:14
-
-
Save nosoop/5bfab038e651fa35b7e1b12a7a9c47fc to your computer and use it in GitHub Desktop.
Hooks the spray command, disabling its use.
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
/** | |
* Disables the spray command. | |
*/ | |
#pragma semicolon 1 | |
#include <sourcemod> | |
#include <sdktools_hooks> | |
#pragma newdecls required | |
#define PLUGIN_VERSION "0.0.0" | |
public Plugin myinfo = { | |
name = "Spray Disabler", | |
author = "nosoop", | |
description = "Prevents usage of the spray command.", | |
version = PLUGIN_VERSION, | |
url = "https://redd.it/5embg0" | |
} | |
public Action OnPlayerRunCmd(int client, int &buttons, int &impulse) { | |
if (impulse == 201) { | |
impulse = 0; | |
return Plugin_Changed; | |
} | |
return Plugin_Continue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment