Created
September 27, 2017 13:21
-
-
Save Hexer10/61c2344d2a07ffe9a76b944a54bdfaf8 to your computer and use it in GitHub Desktop.
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
ArrayList LrArray; | |
ArrayList LrArray2; | |
public void OnPluginStart() | |
{ | |
LrArray = new ArrayList(32); | |
AddCommandListener(OnSay, "say"); | |
AddCommandListener(OnSay, "say_team"); | |
AddCommandListener(OnCmd); | |
LrArray.PushString("sm_lastrequest"); | |
LrArray.PushString("sm_lr"); | |
} | |
public Action OnSay(int client, const char[] command, int args) | |
{ | |
//Get the say args | |
char sCmd[32]; | |
GetCmdArgString(sCmd, sizeof(sCmd)); | |
ReplaceString(sCmd, sizeof(sCmd), "\"", ""); //Remove quotes from start and end | |
Format(sCmd, sizeof(sCmd), "sm_%s", sCmd[1]); //Start from the 2 array to remove the ChatTrigger | |
if (LrArray.FindString(sCmd) != -1) | |
return Plugin_Stop; | |
return Plugin_Continue; | |
} | |
public Action OnCmd(int client, const char[] command, int args) | |
{ | |
if (LrArray.FindString(command) != -1) | |
return Plugin_Stop; | |
return Plugin_Continue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment