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 <sourcemod>
|
||||||
#include <sdktools>
|
#include <sdktools>
|
||||||
#include <multicolors>
|
#include <multicolors>
|
||||||
|
#include <Spectate>
|
||||||
#include <zombiereloaded>
|
#include <zombiereloaded>
|
||||||
|
|
||||||
int g_iVIPClient = -1;
|
int g_iVIPClient = -1;
|
||||||
@ -120,6 +121,20 @@ public Action OnPlayerTeam(Event event, const char[] name, bool dontBroadcast)
|
|||||||
if(client == g_iVIPClient)
|
if(client == g_iVIPClient)
|
||||||
{
|
{
|
||||||
g_iVIPClient = -1;
|
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);
|
PerformVIPSelection(true);
|
||||||
}
|
}
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user