AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Source Servers (SRCDS) (https://forums.alliedmods.net/forumdisplay.php?f=130)
-   -   CSGO custom game mode (https://forums.alliedmods.net/showthread.php?t=302116)

8guawong 10-17-2017 12:43

CSGO custom game mode
 
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?

Halt 10-17-2017 14:02

Re: CSGO custom game mode
 
Just set it in your command line? +exec "gamemode_custom_server.cfg" unless you already did and thats your issue.

Bacardi 10-17-2017 15:11

Re: CSGO custom game mode
 
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

hamilton5 10-19-2017 08:25

Re: CSGO custom game mode
 
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

Bacardi 10-19-2017 13:35

Re: CSGO custom game mode
 
Quote:

Originally Posted by hamilton5 (Post 2555386)
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.

8guawong 10-26-2017 11:46

Re: CSGO custom game mode
 
Quote:

Originally Posted by Bacardi (Post 2555444)
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!


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

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