Thread: A few errors.
View Single Post
Author Message
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 10-18-2017 , 11:25   A few errors.
Reply With Quote #1

So this block is intended to select a random player, but does not.

PHP Code:
public Action GetZombieTimer(Handle timer)
{
    
int Zombie GetZombie();
    
PrintToChatAll("\x07ff2929[\x0730FF31ZomXR\x07ff2929] - \x07e3f010%N a the zombie leader!"Zombie);
    
CreateTimer(0.5RespawnPlayerGetClientUserId(Zombie), TIMER_FLAG_NO_MAPCHANGE);
}

int GetZombie()
{
    
HasRoundStarted true;
    
int[] Players = new int[MaxClients +1];
    
int ClientCount;
    
    for    (
int IGC 1IGC <= MaxClientsIGC++)
    {
        if    (
IsClientInGame(IGC))
        {
            if    (
PlayerTeam[IGC] == TFTeam_Blue && bIsPlayerAlive[IGC])
                
Players[ClientCount++] = IGC;
        }
    }
    
    return (
ClientCount == 0) ? -Players[GetRandomInt(0ClientCount 1)];

Secondly this block is supposed to respawn players w/o a waiting period. "Instant respawn"

PHP Code:
CreateTimer(0.5RespawnPlayerGetClientUserId(Client), TIMER_FLAG_NO_MAPCHANGE);

public 
Action RespawnPlayer(Handle timerint Client//No client passing though timer
{
    
int iClient GetClientOfUserId(Client);
    if    (!
IsClientConnected(iClient))
        return
    else if    (
IsClientConnected(iClient))
        
TF2_RespawnPlayer(iClient);
    
    
PrintToChat(iClient"You've been respawned");

Halt is offline