Addition to my previous code for sm_nospawn:
sm_nospawn sometimes miss infected/specials, bacause
PHP Code:
FindConVar("director_no_bosses").SetInt(1);
FindConVar("director_no_specials").SetInt(1);
FindConVar("director_no_mobs").SetInt(1);
wasn't enough, (e.g. when panic event occurs), so I also added:
PHP Code:
HookEvent("player_spawn", Event_PlayerSpawn);
public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
if( g_bNospawn )
{
int client = GetClientOfUserId(event.GetInt("userid"));
if( client && IsClientInGame(client) && GetClientTeam(client) == 3 )
{
KickClient(client);
}
}
}
public void OnEntityCreated(int entity, const char[] classname)
{
if( g_bNospawn )
{
if( strcmp(classname, "infected") == 0 )
{
SDKHook(entity, SDKHook_SpawnPost, OnSpawnCommon);
}
}
}
public void OnSpawnCommon(int Ent)
{
RemoveEntity(Ent);
}
Also, could you add please, sm_tele to use like:
Code:
sm_tele @all // teleports everybody to my position
sm_tele @all <x y z>
__________________