VIPMode: select new VIP when old one goes to spec
This commit is contained in:
parent
e9ffb6ceab
commit
277da2945a
@ -3,6 +3,7 @@
|
||||
#include <sourcemod>
|
||||
#include <sdktools>
|
||||
#include <multicolors>
|
||||
#include <Spectate>
|
||||
#include <zombiereloaded>
|
||||
|
||||
int g_iVIPClient = -1;
|
||||
@ -119,7 +120,21 @@ public Action OnPlayerTeam(Event event, const char[] name, bool dontBroadcast)
|
||||
|
||||
if(client == g_iVIPClient)
|
||||
{
|
||||
g_iVIPClient = -1;
|
||||
PerformVIPSelection(true);
|
||||
g_iVIPClient = -1;
|
||||
RequestFrame(RequestFrame_Callback);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPlayerSwitchedToSpectateByCommand(int client)
|
||||
{
|
||||
if(client == g_iVIPClient)
|
||||
{
|
||||
g_iVIPClient = -1;
|
||||
RequestFrame(RequestFrame_Callback);
|
||||
}
|
||||
}
|
||||
|
||||
void RequestFrame_Callback(int iPacked)
|
||||
{
|
||||
PerformVIPSelection(true);
|
||||
}
|
Loading…
Reference in New Issue
Block a user