Addon Details

Watch - Add Favorite


Auto Class Limits for DoD Source

posted on 2006-04-21 18:36:43
by Colster

Tags: classes dods


Any class that isnt set to -1 or 0 will be reduced to a quarter, third or half of what is defined in your main server.cfg As players join or leave the limits are adjusted and when they reach an admin defined level, the classes are set to the limits defined in your main server.cfg. So if you set snipers to 6 in main server.cfg and the cvar [b]class_unlock [/b]in the scriptpacks server.cfg to 18, then if there were 6 players in the server it would reduce that amount to 2 snipers, for 9 players it would up it to 3 and so on. Configure the server.cfg to suit your needs as follows: [quote="server.cfg"] es_setinfo class_unlock 20 es_setinfo mg_unlock 3 es_setinfo sniper_unlock 5 [/quote] Using the above as an example this would mean classes are limited when the number of players on the server is below 20, if the number of players is below 5 then snipers will be disabled, if its below 3 then mgs are disabled as well It will also look for a custom map config based on the currentmap and run that. This is necessary as eventscripts tend to fire first when starting a map (ahead of main server.cfg etc) Handy if you change class limits for certain maps, if you want to disable limit adjusting altogether for that map add: [quote] es_xsetinfo SAS_AutoLimitOff 1 [/quote] to your custom map config. Install as normal, copy entire SAS_AutoLimits folder to your events folder, editing the first line of the server.cfg (class_unlock) to suit your requirements, then add: [quote="autoexec.cfg"] eventscripts_register SAS_AutoLimits [/quote] to your autoexec.cfg, then restart server