Lots of small fixes/improvements

This commit is contained in:
BotoX
2017-05-20 05:08:31 +02:00
parent 3912295377
commit 371d1ce242
10 changed files with 40 additions and 76 deletions
+20
View File
@@ -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)