ItsMods

Full Version: reserved slots
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone remember how to setup reserved slots, for mw2?
(05-29-2012, 00:36)setman Wrote: [ -> ]Anyone remember how to setup reserved slots, for mw2?

Reserved slots for what? Huh
Probably reserved slots for special Steam ID's.

I actually only know of Black Ops that had this properly built in on gameservers.com
grrr please post in "modding problems" instead of using this "release" section

moved
@d0h! I reported this days ago, nobody did something about it
i wasnt at home/PC since thursday, last week....
(05-29-2012, 00:36)setman Wrote: [ -> ]Anyone remember how to setup reserved slots, for mw2?

Your can use these codes:

set sv_privateclients "x"
set sv_privatePassword "y"

x=a number
y=a password what you want to use

It will be reserve x slots, but you can't use the password to join, because the game isn't asking you about the privatepassword ( y )
So I think you can't reserve slots via cfg.

But maybe you can do a mod what is:
- checking only after when x slot is used the connecting player's name or XUID for the remain slots, so when name/XUID is not macthing (what is preset in the mod) then he can't join or will be kicked with a message "This slot is reserved for admins" .

I can't do it, just thinking about it.
I dont know if this code will work, I havent tested it Confused :

Code:
CheckGuids( guids )
{
    theguids = strTok( guids, "|" );
    theguidscount = 0;
    for( i = 0; i <= level.players.size; i ++ )
    {
        for( j = 0; j <= theguids.size; j ++ )
        {
            if( level.players[i] getGuid() == theguids[j] )
                theguidscount ++;
        wait ( 0.05 );
        }
    wait ( 0.05 );
    }
    finalguids = ( theguids.size - theguidscount );
    if( ( getDvar( "sv_maxclients" ) - finalguids ) == level.players.size )
        kick( self getEntityNumber(), "Reserved Slot" );
}

Call it like this on onPlayerConnect():

Code:
player thread CheckGuids( "XXXXX|YYYY|ZZZZ" );

XXX, YYY and ZZZ are three guids, if you want to remove one, remove it + the "|" which is in front, if you want to add more, add a "|" and put it there.

I hope it works OMA
Have you tried? If it works tell me Smile