Raised This Month: $ Target: $400
 0% 

L4DToolZ Metamod plugin (l4d1 & l4d2)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
satannuts
Member
Join Date: Jan 2010
Old 02-10-2010 , 15:59   Re: L4DToolZ Metamod plugin
Reply With Quote #9

ivailosp
Great plugin - I'm a big fan.

back on page one someone asked:
Quote:
Originally Posted by lovemf View Post
and can do this?
sv_maxplayers max human players that can join your server
sv_maxslots max max srcds.exe slots
and you responded:
Quote:
Originally Posted by ivailosp View Post
...
sv_maxslots? max slots is set to 32 in my plugin - you need more?
I think he was requesting if you could ADD that functionality to your plugin.

Could you add the cvar to limit slots AND a separate one to limit human players?

I wanted to set up a reserved slot to kick high ping player when admin connects to my server [running l4dtoolz with bebop for 8 player coop]
cvars in server.cfg:
sm_cvar sv_maxplayers 9 //8 man coop
sm_cvar sv_visiblemaxplayers 8 //-1 default
sm_cvar sv_removehumanlimit 1
sm_cvar sv_unlock_sb_add 1
sm_cvar sv_force_unreserved 1
//sm_cvar z_max_player_zombies 4
sm_cvar survivor_limit 8 //default 4

from sourcemod.cfg:
Quote:
// Specifies how the reserved slots plugin operates. Valid values are:
// 0 : Public slots are used in preference to reserved slots. Reserved slots are freed before public slots.
// 1 : If someone with reserve access joins into a reserved slot, the player with the highest latency and
// no reserved slot access (spectator players are selected first) is kicked to make room. Thus, the reserved
// slots always remains free. The only situation where the reserved slot(s) can become properly occupied is
// if the server is full with reserve slot access clients.
// --
// Requires: reservedslots.smx
// Default: 0
sm_reserve_type 1

// Specifies the number of reserved player slots. Users with the reservation
// admin flag set will be able to join the server when there are no public slots
// remaining. If someone does not have this flag, they will be kicked.
// (Public slots are defined as: maxplayers - number of reserved slots)
// --
// Requires: reservedslots.smx
// Default: 0
sm_reserved_slots 1

// Specifies whether or not reserved slots will be hidden (subtracted from max
// slot count). Valid values are 0 (visible) or 1 (hidden).
// --
// Requires: reservedslots.smx
// Default: 0
sm_hide_slots 1
I don't understand too much script, but when reserved slots hides a slot, it changes sv_visiblemaxplayers according to the max slots.

From reservedslots.sp:
Code:
SetConVarInt(sv_visiblemaxplayers, g_MaxClients);
}

public OnMapStart()
{
    g_MaxClients = GetMaxClients();
    
    if (GetConVarBool(sm_hide_slots))
    {        
        SetVisibleMaxSlots(GetClientCount(false), g_MaxClients - GetConVarInt(sm_reserved_slots));
    }
}

public OnConfigsExecuted()
{
    if (GetConVarBool(sm_hide_slots))
    {
        SetVisibleMaxSlots(GetClientCount(false), g_MaxClients - GetConVarInt(sm_reserved_slots));
    }    
}
I have sv_visiblemaxplayers set to 8, but the reservedslots plugin changes it to 31 when sm_hide_slots set to 1.

Would you be able to fix this by adding a new cvar?
or is this problem beyond the scope of your plugin?
satannuts is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode