From 4a5ba9e9863de0afa109e378d7f55d85cd8103bc Mon Sep 17 00:00:00 2001 From: zaCade Date: Fri, 3 Aug 2018 16:12:54 +0200 Subject: [PATCH] MapChooser: Cleanup some dumb stuff. --- .../scripting/nominations_extended.sp | 8 ++++---- .../scripting/rockthevote_extended.sp | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mapchooser_extended/scripting/nominations_extended.sp b/mapchooser_extended/scripting/nominations_extended.sp index 94d36e06..6f9c40e3 100644 --- a/mapchooser_extended/scripting/nominations_extended.sp +++ b/mapchooser_extended/scripting/nominations_extended.sp @@ -72,9 +72,9 @@ Handle g_mapTrie; // Nominations Extended Convars Handle g_Cvar_MarkCustomMaps = INVALID_HANDLE; - Handle g_Cvar_NominateDelay = INVALID_HANDLE; Handle g_Cvar_InitialDelay = INVALID_HANDLE; + int g_Player_NominationDelay[MAXPLAYERS+1]; int g_NominationDelay; @@ -534,7 +534,7 @@ public Action Command_Nominate(int client, int args) if(result == Nominate_AlreadyInVote) CPrintToChat(client, "[NE] %t", "Map Already In Vote", mapname); else if(result == Nominate_VoteFull) - CPrintToChat(client, "[ME] %t", "Max Nominations"); + CPrintToChat(client, "[NE] %t", "Max Nominations"); return Plugin_Handled; } @@ -856,7 +856,7 @@ stock bool IsNominateAllowed(int client) { case CanNominate_No_VoteInProgress: { - CReplyToCommand(client, "[ME] %t", "Nextmap Voting Started"); + CReplyToCommand(client, "[NE] %t", "Nextmap Voting Started"); return false; } @@ -870,7 +870,7 @@ stock bool IsNominateAllowed(int client) /* case CanNominate_No_VoteFull: { - CReplyToCommand(client, "[ME] %t", "Max Nominations"); + CReplyToCommand(client, "[NE] %t", "Max Nominations"); return false; } */ diff --git a/mapchooser_extended/scripting/rockthevote_extended.sp b/mapchooser_extended/scripting/rockthevote_extended.sp index ddbe98b2..a9a7d42c 100644 --- a/mapchooser_extended/scripting/rockthevote_extended.sp +++ b/mapchooser_extended/scripting/rockthevote_extended.sp @@ -104,9 +104,9 @@ public void OnMapStart() /* Handle late load */ for (int i=1; i<=MaxClients; i++) { - if (IsClientConnected(i)) + if (IsClientInGame(i)) { - OnClientConnected(i); + OnClientPutInServer(i); } } } @@ -131,7 +131,7 @@ public void OnMapTimeLeftChanged() SetupTimeOverTimer(); } -public void OnClientConnected(int client) +public void OnClientPutInServer(int client) { UpdateRTV(); } @@ -156,7 +156,7 @@ void UpdateRTV() { g_Voters = 0; - for (int i=1; i<=MAXPLAYERS; i++) + for (int i=1; i<=MaxClients; i++) { if (IsClientInGame(i) && !IsFakeClient(i)) { @@ -222,25 +222,25 @@ void AttemptRTV(int client) { if (!g_RTVAllowed || (g_Cvar_RTVPostVoteAction.IntValue == 1 && HasEndOfMapVoteFinished())) { - ReplyToCommand(client, "[SM] %t", "RTV Not Allowed"); + ReplyToCommand(client, "[RTVE] %t", "RTV Not Allowed"); return; } if (!CanMapChooserStartVote()) { - ReplyToCommand(client, "[SM] %t", "RTV Started"); + ReplyToCommand(client, "[RTVE] %t", "RTV Started"); return; } if (GetClientCount(true) < g_Cvar_MinPlayers.IntValue) { - ReplyToCommand(client, "[SM] %t", "Minimal Players Not Met"); + ReplyToCommand(client, "[RTVE] %t", "Minimal Players Not Met"); return; } if (g_Voted[client]) { - ReplyToCommand(client, "[SM] %t", "Already Voted", g_Votes, g_VotesNeeded); + ReplyToCommand(client, "[RTVE] %t", "Already Voted", g_Votes, g_VotesNeeded); return; } @@ -250,7 +250,7 @@ void AttemptRTV(int client) g_Votes++; g_Voted[client] = true; - PrintToChatAll("[SM] %t", "RTV Requested", name, g_Votes, g_VotesNeeded); + PrintToChatAll("[RTVE] %t", "RTV Requested", name, g_Votes, g_VotesNeeded); if (g_Votes >= g_VotesNeeded) { @@ -278,7 +278,7 @@ void StartRTV() { GetMapDisplayName(map, map, sizeof(map)); - PrintToChatAll("[SM] %t", "Changing Maps", map); + PrintToChatAll("[RTVE] %t", "Changing Maps", map); CreateTimer(5.0, Timer_ChangeMap, _, TIMER_FLAG_NO_MAPCHANGE); g_InChange = true;