Skip to content

Commit 328cfb0

Browse files
committed
Release 1.0.0
2 parents 901711c + a80bd98 commit 328cfb0

File tree

10 files changed

+800
-3
lines changed

10 files changed

+800
-3
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ Allows you to prevent spam by voice commands
99
### Installation
1010

1111
* Download latest [release](https://github.com/dronelektron/anti-voice-commands-spam/releases) (compiled for SourceMod 1.11)
12-
* Extract "plugins" folder to "addons/sourcemod" folder of your server
12+
* Extract "plugins" and "translations" folders to "addons/sourcemod" folder of your server
13+
14+
### Console Variables
15+
16+
* sm_avcs_seconds - How many seconds should elapse between voice commands [default: "5.0"]

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
PLUGIN_NAME="anti-voice-commands-spam"
44

55
cd scripting
6-
spcomp $PLUGIN_NAME.sp -o ../plugins/$PLUGIN_NAME.smx
6+
spcomp $PLUGIN_NAME.sp -i include -o ../plugins/$PLUGIN_NAME.smx

scripting/anti-voice-commands-spam.sp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
#include <sourcemod>
22

3+
#include "morecolors"
4+
5+
#include "modules/console-command.sp"
6+
#include "modules/console-variable.sp"
7+
#include "modules/message.sp"
8+
#include "modules/use-case.sp"
9+
310
public Plugin myinfo = {
411
name = "Anti voice commands spam",
512
author = "Dron-elektron",
613
description = "Allows you to prevent spam by voice commands",
7-
version = "0.1.0",
14+
version = "1.0.0",
815
url = "https://github.com/dronelektron/anti-voice-commands-spam"
916
};
17+
18+
public void OnPluginStart() {
19+
Command_AddListeners();
20+
Variable_Create();
21+
LoadTranslations("anti-voice-commands-spam.phrases");
22+
AutoExecConfig(true, "anti-voice-commands-spam");
23+
}
24+
25+
public void OnClientConnected(int client) {
26+
UseCase_ResetLastVoiceCommandTime(client);
27+
}

0 commit comments

Comments
 (0)