forked from UNLOZE/sm-plugins
Lots of small fixes/improvements
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <sourcemod>
|
||||
#include <sdktools>
|
||||
#include <cstrike>
|
||||
#include <zombiereloaded>
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
@@ -63,6 +64,25 @@ public Action Command_Spectate(int client, int argc)
|
||||
return Plugin_Handled;
|
||||
}
|
||||
|
||||
if (IsPlayerAlive(client) && ZR_IsClientZombie(client))
|
||||
{
|
||||
bool bOnlyZombie = true;
|
||||
for (int i = 1; i <= MaxClients; i++)
|
||||
{
|
||||
if (i != client && IsClientInGame(i) && IsPlayerAlive(i) && ZR_IsClientZombie(i))
|
||||
{
|
||||
bOnlyZombie = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bOnlyZombie)
|
||||
{
|
||||
PrintToChat(client, "[SM] Can not switch to spectate as the last zombie!");
|
||||
return Plugin_Handled;
|
||||
}
|
||||
}
|
||||
|
||||
if (!argc)
|
||||
{
|
||||
if (GetClientTeam(client) != CS_TEAM_SPECTATOR)
|
||||
|
||||
Reference in New Issue
Block a user