Skip to content

Commit 5621530

Browse files
committed
support sm_tier from console
1 parent 6e89a86 commit 5621530

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

plugins/maptiersinfo.smx

70 Bytes
Binary file not shown.

scripting/maptiersinfo.sp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#pragma semicolon 1
66
#pragma newdecls required
77

8-
#define PLUGIN_VERSION "1.2"
8+
#define PLUGIN_VERSION "1.3"
99

1010
enum struct MapInfo {
1111
char Name[64];
@@ -73,7 +73,16 @@ public Action OnPIA(Event event, const char[] name, bool dontBroadcast) {
7373
}
7474

7575
void GreetClient(int client) {
76-
MC_PrintToChat(client, "%t", "Greet", g_CurrentMap.Name, g_CurrentMap.SoldierTier, g_CurrentMap.DemomanTier);
76+
char msg[256];
77+
Format(msg, sizeof(msg), "%t", "Greet", g_CurrentMap.Name, g_CurrentMap.SoldierTier, g_CurrentMap.DemomanTier);
78+
79+
if (client == 0) {
80+
MC_RemoveTags(msg, sizeof(msg));
81+
PrintToServer(msg);
82+
}
83+
else {
84+
MC_PrintToChat(client, msg);
85+
}
7786
}
7887
void GetMapTiers() {
7988
char url[128];

0 commit comments

Comments
 (0)