View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-27-2024 , 21:55   Re: Polymorph: Mod Manager
Reply With Quote #1096

Ok, so I think you just want to re-evaluate the RTV condition when players leave. So, I would probably make these changes (this is the diff file of the changes):

PHP Code:
@@ -75,+75,@@ public client_disconnected(id)
         
g_rockedVote[id] = false
         g_rockedVoteCnt
--
     }
+
+    
check_rock_the_vote()
 }
 
 public 
cmdSayRTV(id)
@@ -
128,+130,13 @@ public cmdSayRTV(id)
     
g_rockedVoteCnt++
     
client_print(id,print_chat"[MG] You chose to change Mod")
     
+    
check_rock_the_vote()
+
+    return 
PLUGIN_CONTINUE
+}
+
+
check_rock_the_vote()
+{
     if( 
g_rockedVoteCnt >= get_RocksNeeded() )     // Decide if we rock the vote
     
{
         
g_hasbeenrocked true
@@ -139,+148,@@ public cmdSayRTV(id)
     {
         
rtv_remind()
     }
-    
-    return 
PLUGIN_CONTINUE
 
}
 
 public 
startRockVote() 
__________________
fysiks is offline