Skip to content

Commit

Permalink
Merge pull request #6 from condolent/dev
Browse files Browse the repository at this point in the history
0.6.3.4
  • Loading branch information
jonteohr authored May 25, 2020
2 parents 2fe0d52 + e8fcec1 commit 3afa415
Show file tree
Hide file tree
Showing 62 changed files with 2,974 additions and 3,979 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ env:
- SCRIPTING=addons/sourcemod/scripting/
- PLUGINS=addons/sourcemod/plugins/
matrix:
- SOURCEMOD=1.8
- SOURCEMOD=1.10

before_install:
- mkdir build-env

install:
- cd build-env
- wget -q "http://www.sourcemod.net/latest.php?version=1.9&os=linux" -O sourcemod.tar.gz
- wget -q "http://www.sourcemod.net/latest.php?version=1.10&os=linux" -O sourcemod.tar.gz
- tar -xzf sourcemod.tar.gz
- cd ../
- find build-env/addons/sourcemod/scripting/ -name "*.sp" -type f -delete
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Fixes on some french translations
- Fixed variable names
- Added gangs <sup>Add-On!</sup>
- Code cleanup
- Warden-menu bug fixes
- Added announcer
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<p align="center">
<sup><strong>You are highly discouraged to use the version in the <i>dev</i> branch unless you have at the very least basic knowledge of SourcePawn programming!</strong></sup>
<p>

<h1 align="center">Better Warden</h1>

<p align="center">
<img src="http://i.imgur.com/WXfuF5Y.png" width="572px"><br/>
<a href="https://travis-ci.org/condolent/Better-Warden">
<img src="https://travis-ci.org/condolent/Better-Warden.svg?branch=master">
<img src="https://travis-ci.org/condolent/Better-Warden.svg?branch=dev">
</a>
<a href="https://github.com/condolent/Better-Warden/wiki">
<img src="https://img.shields.io/badge/Plugin-Wiki-orange.svg?style=flat">
Expand All @@ -23,6 +27,9 @@
<a href="https://github.com/condolent/Better-Warden/blob/master/LICENSE">
<img src="https://img.shields.io/badge/License-GPL3-red.svg?style=flat">
</a>
<a href="//discord.gg/XJqgf7T">
<img src="https://discordapp.com/api/guilds/411133988598710304/widget.png">
</a>
</p>
<p align="center">
<sup><strong>An improved and more advanced warden plugin with a custom menu for CS:GO jailbreak servers!</strong></sup>
Expand All @@ -41,10 +48,11 @@
1. [Download the plugin package](https://github.com/condolent/Better-Warden/releases)
2. In the `SERVER FILES` folder, drag all of its' content to your servers root folder (`csgo`)
3. Everything in the `FASTDL` folder should be uploaded to your FastDL webserver
4. Restart your server or change map
5. Make your desired changes in the configs located in `csgo/cfg/BetterWarden` folder
6. Change map or restart the server
7. Done!
4. Add the database entry named `betterwarden` to your databases.cfg file in _root/addons/sourcemod/configs_
5. Restart your server or change map
6. Make your desired changes in the configs located in `csgo/cfg/BetterWarden` folder
7. Change map or restart the server
8. Done!

## Dependencies
* [SmartJailDoors](https://forums.alliedmods.net/showthread.php?t=264100) _by Kailo_
Expand All @@ -57,6 +65,8 @@ The major function this plugin offers is that the warden can choose special even
3. Warday
4. Gravity Freeday

Also introducing gangs. Prisoners can now create gangs where they can communicate in their own gangchat and such.

There's also some other functions in the menu that the warden can take advantage of in order to make the game more comfortable.
Some of the other entries in the menu include:
1. Toggle noblock
Expand All @@ -82,6 +92,8 @@ Some of the other entries in the menu include:
|`sm_warden_createsound`|**1**|Play a sound to everyone when someone becomes warden 1 = Enable. 0 = Disable.|
|`sm_warden_logs`|**0**|Do you want the plugin to write logs? Generally only necessary when you're experiencing any sort of issue. 1 = Enable. 0 = Disable.|
|`sm_warden_nolr`|**1**|Allow warden to control if terrorists can do a !lastrequest or !lr when available? 1 = Enable. 0 = Disable.|
|`sm_warden_servertag`|**1**|Add Better Warden tags to your servers sv_tags?|
|`sm_warden_announcer`|**1**|Allow automatic messages to show in chat each 4th minute with tips and commands for Better Warden?|

### WardenMenu
| ConVar | Default | Description |
Expand Down Expand Up @@ -109,3 +121,5 @@ Some of the other entries in the menu include:
* Swedish ✓
* French ✓
* Russian ×

_Wish to help the translation? [Go here!](http://translator.mitchdempsey.com/sourcemod_plugins/tagged/betterwarden)_
15 changes: 9 additions & 6 deletions addons/sourcemod/scripting/BetterWarden/Add-Ons/catch.sp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@

bool g_bIsCatchActive;

int g_iCountDown = -1;

ConVar gc_bFreezeTime;
ConVar gc_iFreezeTime;

public Plugin myinfo = {
name = "[BetterWarden] Catch",
Expand All @@ -49,9 +52,11 @@ public void OnPluginStart() {
LoadTranslations("BetterWarden.Catch.phrases.txt");
SetGlobalTransTarget(LANG_SERVER);

AutoExecConfig_SetCreateDirectory(true);
AutoExecConfig_SetFile("Catch", "BetterWarden/Add-Ons");
AutoExecConfig_SetCreateFile(true);
gc_bFreezeTime = AutoExecConfig_CreateConVar("sm_warden_catch_freezetime", "1", "Freeze all CT's for 5 seconds when game is started?\n1 = Enable.\n0 = Disable.", FCVAR_NOTIFY, true, 0.0, true, 1.0);
gc_bFreezeTime = AutoExecConfig_CreateConVar("sm_warden_catch_freezetime", "1", "Freeze all CT's for a specified time when game is started?\n1 = Enable.\n0 = Disable.", FCVAR_NOTIFY, true, 0.0, true, 1.0);
gc_iFreezeTime = AutoExecConfig_CreateConVar("sm_warden_catch_freezetime_amount", "5.0", "If sm_warden_catch_freezetime is set to 1,\nHow long should they be frozen?\nIn seconds.", FCVAR_NOTIFY, true, 0.5);
AutoExecConfig_ExecuteFile();
AutoExecConfig_CleanFile();

Expand Down Expand Up @@ -147,9 +152,8 @@ public Action OnClientCommand(int client, int args) { // If a client starts a La
}

public Action FreezeTimer(Handle timer) {
static int secs = 5;

if(secs == 0) {
if(g_iCountDown == GetTime()) {
CPrintToChatAll("%s Catch has begun!", g_sPrefix);
for(int i = 1; i <= MaxClients; i++) {
if(!IsValidClient(i))
Expand All @@ -158,12 +162,10 @@ public Action FreezeTimer(Handle timer) {
continue;
SetEntPropFloat(i, Prop_Data, "m_flLaggedMovementValue", 1.5);
}
secs = 5;
return Plugin_Stop;
}

CPrintToChatAll("%s Catch starts in %d seconds!", g_sPrefix, secs);
secs--;
CPrintToChatAll("%s Catch starts in %d seconds!", g_sPrefix, (g_iCountDown - GetTime()));
return Plugin_Continue;
}

Expand Down Expand Up @@ -199,6 +201,7 @@ public int Native_initCatch(Handle plugin, int numParams) { // Called to start t
SetEntPropFloat(i, Prop_Data, "m_flLaggedMovementValue", 0.0);
}
CreateTimer(1.0, FreezeTimer, _, TIMER_REPEAT);
g_iCountDown = GetTime() + gc_iFreezeTime.IntValue;
}

AddToBWLog("Catch was initiated!");
Expand Down
Loading

0 comments on commit 3afa415

Please sign in to comment.