I'd also like to state that I've successfully fixed the "First Round Glitch or FRG" (the frg is when, after playing the 1st round of arena and then 2nd round being 1st round of saxton hale, players will usually/sometimes not have the intended weapon switches/changes)
Change this
PHP Code:
public Action:StartHaleTimer(Handle:hTimer)
{
CreateTimer(0.1, GottamTimer);
if (!IsValidClient(Hale))
{
VSHRoundState = 2;
return Plugin_Continue;
}
if (!IsPlayerAlive(Hale))
{
TF2_RespawnPlayer(Hale);
}
playing = 0;
for (new client = 1; client <= MaxClients; client++)
{
if (IsValidClient(client) && (client != Hale) && IsPlayerAlive(client))
{
playing++;
CreateTimer(0.15, MakeNoHale, GetClientUserId(client));
}
}
To this!
PHP Code:
public Action:StartHaleTimer(Handle:hTimer)
{
CreateTimer(0.1, GottamTimer);
if (!IsValidClient(Hale))
{
VSHRoundState = 2;
return Plugin_Continue;
}
if (!IsPlayerAlive(Hale)) TF2_RespawnPlayer(Hale);
playing = 0;
for (new i = 1; i <= MaxClients; i++)
{
if (!IsClientInGame(i) || !IsPlayerAlive(i) || i == Hale) continue;
playing++;
CreateTimer(0.2, MakeNoHale, GetClientUserId(i));
}
Then change this
PHP Code:
public Action:event_player_spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (!IsValidClient(client, false))
return Plugin_Continue;
if (!Enabled)
return Plugin_Continue;
SetVariantString("");
AcceptEntityInput(client, "SetCustomModel");
if (client == Hale && VSHRoundState < 2 && VSHRoundState != -1)
CreateTimer(0.1, MakeHale);
else if (VSHRoundState >= 0)
{
if (!(VSHFlags[client] & VSHFLAG_HASONGIVED))
{
VSHFlags[client] |= VSHFLAG_HASONGIVED;
RemovePlayerBack(client, { 57, 133, 231, 405, 444, 608, 642 }, 7);
RemovePlayerTarge(client);
TF2_RemoveAllWeapons(client);
TF2_RegeneratePlayer(client);
CreateTimer(0.1, Timer_RegenPlayer, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
}
CreateTimer(0.2, MakeNoHale, GetClientUserId(client));
}
to this!
PHP Code:
public Action:event_player_spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (!IsValidClient(client, false)) return Plugin_Continue;
if (!Enabled) return Plugin_Continue;
SetVariantString("");
AcceptEntityInput(client, "SetCustomModel");
if (client == Hale && VSHRoundState < 2 && VSHRoundState != -1) CreateTimer(0.1, MakeHale);
if (VSHRoundState != -1)
{
CreateTimer(0.2, MakeNoHale, GetClientUserId(client));
if (!(VSHFlags[client] & VSHFLAG_HASONGIVED))
{
VSHFlags[client] |= VSHFLAG_HASONGIVED;
RemovePlayerBack(client, { 57, 133, 231, 405, 444, 608, 642 }, 7);
RemovePlayerTarge(client);
TF2_RemoveAllWeapons(client);
TF2_RegeneratePlayer(client);
CreateTimer(0.1, Timer_RegenPlayer, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
}
}
__________________