Hello! This plugin is great! but due that after an update issued around 2014 - 2015, the TF2_RegeneratePlayer function changes slightly, slightly enough that if its bound to player_spawn, it will make minions switch teams the moment they spawn on any vsh / ff2 server, to fix that i've made some changes on the plugin, heres the fixed version:
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <tf2>
#include <tf2_stocks>
public Plugin myinfo =
{
name = "invisiwepfix",
author = "Frenzoid",
description = "Fixes invisible weapons.",
version = "2.0",
url = "sourcemod.net"
};
public void OnPluginStart()
{
HookEvent("teamplay_round_start", Fix_Function, EventHookMode_Post);
}
public Action Fix_Function(Event eEvent, const char[] sName, bool bDontBroadcast)
{
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && (!IsFakeClient(i)) && IsPlayerAlive(i))
{
TF2_RemoveAllWeapons(i);
TF2_RegeneratePlayer(i);
}
}
}
Best regards!