Incase anyone cares this is what we (Headline and myself) ended up using as the solution.
PHP Code:
public Action GetZombieTimer(Handle timer)
{
int _FirstZombie = GetZombie();
if (_FirstZombie > 0 && GetClientCount() <= 5)
TF2_RespawnPlayer(_FirstZombie);
if (_FirstZombie > 0 && GetClientCount() >= 10)
{
int _FirstZombie2 = GetZombie();
TF2_RespawnPlayer(_FirstZombie2);
}
if (_FirstZombie > 0 && GetClientCount() >= 15)
{
int _FirstZombie3 = GetZombie();
TF2_RespawnPlayer(_FirstZombie3);
}
if (_FirstZombie > 0 && GetClientCount() >= 20)
{
int _FirstZombie4 = GetZombie();
TF2_RespawnPlayer(_FirstZombie4);
}
}
int GetZombie()
{
int[] ClientIndexArray = new int[MaxClients + 1];
int Increments = 0;
for (int i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i))
{
continue;
}
if (i == g_iLastZombie)
{
continue;
}
ClientIndexArray[Increments] = i;
Increments++
}
if (Increments == 0)
{
return 0; //Possible Error
}
int SelectedIndex = GetRandomInt(0, Increments - 1);
g_iLastZombie = ClientIndexArray[SelectedIndex];
bIsPlayerZombie[g_iLastZombie] = true;
PrintToChat(g_iLastZombie, "\x07ff2929[\x0730FF31ZomXR\x07ff2929] - \x07e3f010You've been selected as the first zombie");
PrintToChatAll("\x07ff2929[\x0730FF31ZomXR\x07ff2929] - \x07e3f010%N is the zombie leader!", g_iLastZombie);
return g_iLastZombie;
}
If you were picked randomly last time you will not be picked randomly next time. Unless there are multiple players on the server.