View Single Post
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 05-12-2022 , 20:27   Re: [ANY] Map Slots Locker
Reply With Quote #8

Quote:
Originally Posted by Dragokas View Post
Whaaaat? What is your test environment?

PHP Code:
public Action CmdMapLock(int clientint 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 clientint 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.
cravenge is offline