Skip to content

Commit

Permalink
1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
MK99MA committed Mar 12, 2022
1 parent b00e3f5 commit 7117809
Show file tree
Hide file tree
Showing 12 changed files with 85 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [So]ccer [Mo]d [E]dit [-] [2019] (Current Version: 1.3.4 | Latest Tested Version: 1.3.3)
# [So]ccer [Mo]d [E]dit [-] [2019] (Current Version: 1.3.5 | Latest Tested Version: 1.3.3)

An edited Version of Marco Boogers SourceMod plugin aimed at Counter-Strike:Source soccer servers.
I merely edited and added stuff without any prior knowledge, so expect some heavily improvable code.
Expand Down
Binary file not shown.
Binary file modified addons/sourcemod/plugins/soccer_mod.smx
Binary file not shown.
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/soccer_mod.sp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// **************************************************************************************************************
// ************************************************** DEFINES ***************************************************
// **************************************************************************************************************
#define PLUGIN_VERSION "1.3.4.1"
#define PLUGIN_VERSION "1.3.5"
#define UPDATE_URL "https://raw.githubusercontent.com/MK99MA/SoMoE-19/master/addons/sourcemod/updatefile.txt"
#define MAX_NAMES 10
#define MAXCONES_DYN 15
Expand Down
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/soccer_mod/createconfig.sp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public void CreateSoccerModConfig()
kvConfig.SetNum("soccer_mod_killfeed", killfeedSet);
kvConfig.SetNum("soccer_mod_celebrate", celebrateweaponSet);
kvConfig.SetNum("soccer_mod_first12", first12Set);
kvConfig.SetNum("soccer_mod_otcount", OTCountSet);
kvConfig.GoBack();

kvConfig.JumpToKey("Sprint Settings", true);
Expand Down Expand Up @@ -511,6 +512,7 @@ public void ReadFromConfig()
killfeedSet = kvConfig.GetNum("soccer_mod_killfeed", 0);
celebrateweaponSet = kvConfig.GetNum("soccer_mod_celebrate", 0);
first12Set = kvConfig.GetNum("soccer_mod_first12", 0);
OTCountSet = kvConfig.GetNum("soccer_mod_otcount", 1);
kvConfig.GoBack();

kvConfig.JumpToKey("Sprint Settings", true);
Expand Down
1 change: 1 addition & 0 deletions addons/sourcemod/scripting/soccer_mod/globals.sp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ int jump_count[MAXPLAYERS+1] = {0, ...};
int celebrateweaponSet = 0;
int KickoffWallSet = 1;
int first12Set = 0;
int OTCountSet = 1;

// STRINGS
char changeSetting[MAXPLAYERS + 1][32];
Expand Down
42 changes: 41 additions & 1 deletion addons/sourcemod/scripting/soccer_mod/modules/match.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1653,9 +1653,49 @@ public Action MatchPeriodTimer(Handle timer, any time)
PrintHintTextToAll("%s %i - %i %s | %s", custom_name_ct, matchScoreCT, matchScoreT, custom_name_t, timeString);

int periodEnd = matchPeriod * matchPeriodLength;
if (time < periodEnd) matchTimer = CreateTimer(1.0, MatchPeriodTimer, time + 1);
int periodCount = periodEnd - 5;
if (time < periodEnd)
{
if(time >= periodCount)
{
switch(OTCountSet)
{
case 1:
{
PrintCenterTextAll("Overtime in %i seconds", periodEnd - time);
PlaySound("buttons/bell1.wav");
}
case 2:
{
PlaySound("buttons/bell1.wav");
}
case 3:
{
PrintCenterTextAll("Overtime in %i seconds", periodEnd - time);
}
}
}
matchTimer = CreateTimer(1.0, MatchPeriodTimer, time + 1);
}
else
{
switch(OTCountSet)
{
case 1:
{
PrintCenterTextAll("Overtime!");
PlaySound("ui/achievement_earned.wav");
}
case 2:
{
PlaySound("ui/achievement_earned.wav");
}
case 3:
{
PrintCenterTextAll("Overtime!");
}
}

matchStoppageTimeStarted = true;

int index = CreateEntityByName("trigger_once");
Expand Down
33 changes: 32 additions & 1 deletion addons/sourcemod/scripting/soccer_mod/modules/settings.sp
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,17 @@ public void OpenMenuMapSounds(int client)
{
Menu menu = new Menu(MenuHandlerMapSounds);

menu.SetTitle("Soccer Mod - Admin - Map Sounds");
char OTCString[32];
if(OTCountSet == 0) OTCString = "OT Warning: OFF";
else if (OTCountSet == 1) OTCString = "OT Warning: ON";
else if (OTCountSet == 2) OTCString = "OT Warning: SOUND";
else if (OTCountSet == 3) OTCString = "OT Warning: TEXT";

menu.SetTitle("Soccer Mod - Admin - Sounds");

menu.AddItem("rem", "Disable Sound");
menu.AddItem("add", "Enable Sound");
menu.AddItem("otctoggle", OTCString);

menu.ExitBackButton = true;
menu.Display(client, MENU_TIME_FOREVER);
Expand All @@ -732,6 +739,30 @@ public int MenuHandlerMapSounds(Menu menu, MenuAction action, int client, int ch

if(StrEqual(menuItem, "rem")) OpenMenuMapSoundsRem(client);
else if(StrEqual(menuItem, "add")) OpenMenuMapSoundsAdd(client);
else if(StrEqual(menuItem, "otctoggle"))
{
if(OTCountSet == 0)
{
OTCountSet = 1;
UpdateConfigInt("Misc Settings", "soccer_mod_otcount", OTCountSet);
}
else if(OTCountSet == 1)
{
OTCountSet = 2;
UpdateConfigInt("Misc Settings", "soccer_mod_otcount", OTCountSet);
}
else if(OTCountSet == 2)
{
OTCountSet = 3;
UpdateConfigInt("Misc Settings", "soccer_mod_otcount", OTCountSet);
}
else if(OTCountSet == 3)
{
OTCountSet = 0;
UpdateConfigInt("Misc Settings", "soccer_mod_otcount", OTCountSet);
}
OpenMenuMapSounds(client);
}
}
else if (action == MenuAction_Cancel && choice == -6) OpenMenuSettings(client);
else if (action == MenuAction_End) menu.Close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public void OpenAdvancedTrainingMenu(int client)

menu.SetTitle("Soccer Mod - Advanced Training");

char TrailString[32], TrainModeString[32];
char TrainModeString[32]; //,TrailString[32]

if(trainingModeEnabled) TrainModeString = "Trainingmode: ON";
else TrainModeString = "Trainingmode: OFF";
Expand Down
4 changes: 2 additions & 2 deletions addons/sourcemod/updatefile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
{
"Version"
{
"Latest" "1.3.4"
"Previous" "1.3.3"
"Latest" "1.3.5"
"Previous" "1.3.4"
}

"Notes" "Minor changes & fixes"
Expand Down
3 changes: 2 additions & 1 deletion docs/changelogs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Changelog
=========

-----
1.3.2 & 1.3.3 & 1.3.4
1.3.2 & 1.3.3 & 1.3.4 & 1.3.5
-----

***
Expand All @@ -15,6 +15,7 @@ New
- Added Pre-Cap-Join option to First12 Toggle
- Added notification if a player that shouldn't be allowed to play joins a team / gets forced
- Added !aim command to find out coordinates to use with replacer configs
- Added optional (default ON) sound & text notification before a period ends

*******
Changes
Expand Down
3 changes: 2 additions & 1 deletion docs/mainmenu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ Unless an indicator is added, the indicator of the next higher menu applies to e
│ │
│ ├─ Sound Control (^)
│ │ ├─ Remove Sound
│ │ └─ Add Sound
│ │ ├─ Add Sound
│ │ └─ Overtime Warning Toggle (OFF, ON, SOUND, TEXT)
│ │
│ ├─ Lock Settings (^)
│ │ ├─ Enable Serverlock
Expand Down

0 comments on commit 7117809

Please sign in to comment.