View Single Post
Downtown1
Veteran Member
Join Date: Mar 2004
Old 12-29-2009 , 19:38   Re: [L4D/2] Campaign Manager
Reply With Quote #6

Quote:
Originally Posted by Bigbuck View Post
I just use sm_ in case users put my plugins cvars into the server.cfg so they know its a sourcemod cvar.
L4D2 itself doesn't have any public CVARs starting with L4D so it's not a problem. Pretty much all the other plugins are using l4d_ or l4d2_ as CVAR prefixes so you should stick with that convention so we can get your plugin approved faster.

Quote:
Downtown, that is a good idea and something I will look into adding for the next version. Since the maps are already sorted based on what gamemodes they support I can just use a ServerCommand("map map_name gamemode") instead of ForceChangeLevel. One problem I do know with that is it tends to disconnect everyone when the gamemode gets changed. Maybe there is a way around that, but I haven't looked too much into it.
sm_cvar mp_gamemode <gamemode>
changelevel <level>

Works without disconnecting anyone.

Since not all maps support all game modes (eg scavenge for c1 only is supported by c1m4) it may make sense to first display the game mode that is being changed to, then the list of maps that are supported by that game mode.

e.g. command 1: opens up a map changing menu for the current game mode. command 2: opens up a game mode menu that when selected goes to the command 1 menu.

Last edited by Downtown1; 12-29-2009 at 19:42.
Downtown1 is offline