Skip to content

Commit d39dacc

Browse files
committed
Release 0.1.1
2 parents 03c4197 + 2bcbdc5 commit d39dacc

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

scripting/class-manager.sp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public Plugin myinfo = {
1414
name = "Class manager",
1515
author = "Dron-elektron",
1616
description = "Allows you to perform various operations on player classes",
17-
version = "0.1.0",
17+
version = "0.1.1",
1818
url = ""
1919
}
2020

scripting/modules/convar.sp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ void ConVarChanged_ClassLimit(ConVar conVar, char[] oldValue, char[] newValue) {
3535
int limit = StringToInt(newValue);
3636

3737
GetConVarTeamAndClass(conVar, team, class);
38-
NotifyAboutClassLimitChange(team, class, limit);
3938
MovePlayersToSpectator(team, class, limit);
4039
}
4140

scripting/modules/menu.sp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,15 @@ int MenuHandler_TeamAction(Menu menu, MenuAction action, int param1, int param2)
141141

142142
if (StrEqual(info, ALLIES)) {
143143
SetConVarValue(Team_Allies, class, limit);
144+
NotifyAboutClassLimitChange(param1, Team_Allies, class, limit);
144145
} else if (StrEqual(info, AXIS)) {
145146
SetConVarValue(Team_Axis, class, limit);
147+
NotifyAboutClassLimitChange(param1, Team_Axis, class, limit);
146148
} else if (StrEqual(info, BOTH_TEAMS)) {
147149
SetConVarValue(Team_Allies, class, limit);
150+
NotifyAboutClassLimitChange(param1, Team_Allies, class, limit);
148151
SetConVarValue(Team_Axis, class, limit);
152+
NotifyAboutClassLimitChange(param1, Team_Axis, class, limit);
149153
}
150154
} else {
151155
MenuHandler_Default(menu, action, param1, param2);

scripting/modules/message.sp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
void NotifyAboutClassLimitChange(int team, int class, int limit) {
2-
PrintToChatAll("%s%t", PREFIX, "Class limit was changed", classNames[class], teamNames[team - 2], limit);
1+
void NotifyAboutClassLimitChange(int client, int team, int class, int limit) {
2+
ShowActivity2(client, PREFIX, "%t", "Class limit was changed", classNames[class], teamNames[team - 2], limit);
3+
LogAction(client, -1, "\"%L\" changed class limit of '%s' in team '%s' to '%d'", client, classNames[class], teamNames[team - 2], limit);
34
}
45

56
void NotifyAboutSpectatorTeam(int client) {

0 commit comments

Comments
 (0)