Raised This Month: $32 Target: $400
 8% 

CSGO custom game mode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 10-17-2017 , 12:43   CSGO custom game mode
Reply With Quote #1

running server with game_type set to 3
but i noticed gamemode_custom_server.cfg was not executed
was wondering if any1 have the same problem or this is suppose to be this way?

also was wondering for sv_server_graphic1 do we need to upload the file that is used to the fastdl?

Last edited by 8guawong; 10-17-2017 at 12:44.
8guawong is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 10-17-2017 , 14:02   Re: CSGO custom game mode
Reply With Quote #2

Just set it in your command line? +exec "gamemode_custom_server.cfg" unless you already did and thats your issue.
Halt is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-17-2017 , 15:11   Re: CSGO custom game mode
Reply With Quote #3

in gamemodes.txt
game_type 3 game_mode 0
it not execute cfg file, because line have "comment" //"exec" "gamemode_custom.cfg"

So create custom game modes file

...csgo/gamemodes_server.txt
Code:
// DO NOT MODIFY THIS FILE
// 
// To customize your server, see gamemodes_server.txt.example


"GameModes.txt"
{
	"gameTypes"
	{
		"custom"
		{
			"gameModes"
			{
				"custom"
				{
					"exec"
					{
						"exec" "gamemode_custom.cfg"
						"exec" "gamemode_custom_server.cfg"
					}
				}
			}
		}
	}
}

*edit
wierd not work

only server.cfg works

*edit
I assume those are harcoded in game, can't change from gamemodes_server.txt
__________________
Do not Private Message @me

Last edited by Bacardi; 10-17-2017 at 15:48.
Bacardi is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 10-19-2017 , 08:25   Re: CSGO custom game mode
Reply With Quote #4

gamemodes.txt has changed. even the "gamemode_custom.cfg" is //commented out.. _server.cfg entry is missing too. It did used to work.. If I really needed it, the simple(not correct) thing todo would be change the gamedmodes.txt file
hamilton5 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-19-2017 , 13:35   Re: CSGO custom game mode
Reply With Quote #5

Quote:
Originally Posted by hamilton5 View Post
gamemodes.txt has changed. even the "gamemode_custom.cfg" is //commented out.. _server.cfg entry is missing too. It did used to work.. If I really needed it, the simple(not correct) thing todo would be change the gamedmodes.txt file
What I tested, even that didn't help.
I looked with AddCommandListener and with ECHO command in cfg file.

Code:
game_type
"game_type" = "3" ( def. "0" ) game client replicated                            - The current game
sv_game_mode_convars
exec {
  exec gamemode_custom.cfg
}
GameTypes: dumping convars for bot difficulty (none:0):convars {
  bot_difficulty int( 0 = 0x0 )
  bot_dont_shoot int( 1 = 0x1 )
  bot_quota int( 0 = 0x0 )
}
This only happen in game_type 3, any other works fine.









*edit
Here little plugin
PHP Code:
public void OnConfigsExecuted()
{
    
ConVar cvar FindConVar("game_type");
    if(
cvar.IntValue == 3)
    {
        
KeyValues kv CreateKeyValues("GameModes.txt");
        
kv.ImportFromFile("gamemodes.txt");

        if(
kv.JumpToKey("gameTypes/custom/gameModes/custom/exec/exec"))
        {
            
char buffer[30];

            do
            {
                
kv.GetString(NULL_STRINGbuffersizeof(buffer), "");
                
ServerCommand("exec \"%s\""buffer);
            }
            while(
kv.GotoNextKey(false))
        }
        
        
delete kv;
        
kv CreateKeyValues("GameModes.txt");

        
kv.ImportFromFile("gamemodes_server.txt");

        if(
kv.JumpToKey("gameTypes/custom/gameModes/custom/exec/exec"))
        {
            
char buffer[30];

            do
            {
                
kv.GetString(NULL_STRINGbuffersizeof(buffer), "");
                
ServerCommand("exec \"%s\""buffer);
            }
            while(
kv.GotoNextKey(false))
        }
        
delete kv;
    }

This will execute config files added in game mode custom/custom - in game_type 3.
This not look custom game_modes.
__________________
Do not Private Message @me

Last edited by Bacardi; 10-19-2017 at 14:24.
Bacardi is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 10-26-2017 , 11:46   Re: CSGO custom game mode
Reply With Quote #6

Quote:
Originally Posted by Bacardi View Post
What I tested, even that didn't help.
I looked with AddCommandListener and with ECHO command in cfg file.

Code:
game_type
"game_type" = "3" ( def. "0" ) game client replicated                            - The current game
sv_game_mode_convars
exec {
  exec gamemode_custom.cfg
}
GameTypes: dumping convars for bot difficulty (none:0):convars {
  bot_difficulty int( 0 = 0x0 )
  bot_dont_shoot int( 1 = 0x1 )
  bot_quota int( 0 = 0x0 )
}
This only happen in game_type 3, any other works fine.









*edit
Here little plugin
PHP Code:
public void OnConfigsExecuted()
{
    
ConVar cvar FindConVar("game_type");
    if(
cvar.IntValue == 3)
    {
        
KeyValues kv CreateKeyValues("GameModes.txt");
        
kv.ImportFromFile("gamemodes.txt");

        if(
kv.JumpToKey("gameTypes/custom/gameModes/custom/exec/exec"))
        {
            
char buffer[30];

            do
            {
                
kv.GetString(NULL_STRINGbuffersizeof(buffer), "");
                
ServerCommand("exec \"%s\""buffer);
            }
            while(
kv.GotoNextKey(false))
        }
        
        
delete kv;
        
kv CreateKeyValues("GameModes.txt");

        
kv.ImportFromFile("gamemodes_server.txt");

        if(
kv.JumpToKey("gameTypes/custom/gameModes/custom/exec/exec"))
        {
            
char buffer[30];

            do
            {
                
kv.GetString(NULL_STRINGbuffersizeof(buffer), "");
                
ServerCommand("exec \"%s\""buffer);
            }
            while(
kv.GotoNextKey(false))
        }
        
delete kv;
    }

This will execute config files added in game mode custom/custom - in game_type 3.
This not look custom game_modes.
i did it the easier way with mapconfig plugin
but anyway thx Bacardi!
__________________
8guawong is offline
Reply



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 17:28.


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