Quote:
Originally Posted by Dragokas
Whaaaat? What is your test environment?
PHP Code:
public Action CmdMapLock(int client, int args)
{
PrintToChatAll("MaxClients (before) = %i", MaxClients);
LockSlots();
g_bSlotsLockedForce = true;
CPrintToChat(client, "%t", "slots_lock");
PrintToChatAll("MaxClients (after) = %i", MaxClients);
return Plugin_Handled;
}
public Action CmdMapUnlock(int client, int args)
{
PrintToChatAll("MaxClients (before) = %i", MaxClients);
UnlockSlots();
g_bSlotsLockedForce = false;
CPrintToChat(client, "%t", "slots_unlock");
PrintToChatAll("MaxClients (after) = %i", MaxClients);
return Plugin_Handled;
}
|
i don't mean SM's but rather the game's. I remember fiddling with UTIL_PlayerByIndex before.
Whenever the maximum amount of available slots is changed, it's also reflected in that function. If "sv_maxplayers" is set to 1, it will only verify the first client as a valid player and invalidate everyone else. For SourceTV enabled servers, only the SourceTV bot will be verified.