View Single Post
Author Message
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 07-06-2019 , 08:41   MultiCFG for Deathmatch Advanced
Reply With Quote #1

Lots of people have been asking on how to create a "MultiCFG" Deathmatch server. Im not a coder so I just found an easy temp solution until someone makes a proper plugin. Im calling it MultiMode since MultiCFG is a name a different community came up with.

How to use:
You basically need a plugin that loads Deathmatch Advanced modes on a timer. This code below will do just that. You can change the time (default 300 sec). You can also add or remove modes (default has 4 modes). If you adding/removing modes you need to change "if(chosen == 3)" to match the amount of modes you running.

The modes like "Ak Colt" is found in the deathmatch.ini file.There you can create your own modes and play arround with the messages and configs to load such as HS only for example.
You can also edit the code and use respawn instead of equip if you like that better.

You can edit the code and compile it with https://spider.limetech.io/

Requirements:
Deathmatch Goes Advanced


MultiMode code:
Code:
#include <sourcemod>

public void OnMapStart()
{
    CreateTimer(300.0, Timer_Callback, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
}

chosen = 0;

public Action Timer_Callback(Handle timer)
{

    if(chosen == 0)
        ServerCommand("dm_load \"Game Modes\" \"Ak Colt\" equip");
    else if(chosen == 1)
        ServerCommand("dm_load \"Game Modes\" \"Pistols\" equip");
    else if(chosen == 2)
        ServerCommand("dm_load \"Game Modes\" \"Scout knives\" equip");
    else if(chosen == 3)
        ServerCommand("dm_load \"Game Modes\" \"SMGs\" equip");

    if(chosen == 3)
        chosen = 0;

    chosen++;
    return Plugin_Continue;
}
Example of a mode from deathmatch.ini:
Code:
        "Ak Colt"
        {
            "SectionOptions"
            {
                "AdminMenuName" "Aim/AK-Colt"
                "PlayerDisplay" "AK-Colt"
            }
            
            "Load"
            {
                "Configs" "Options Default"
		"Configs" "Only HS Disabled"
                "Configs" "Show Menu"
                "Configs" "Primary AK and M4"
                "Configs" "Secondary Aim"
                "Configs" "No Nades"
            }
            
            "Cvars"
            {   
                "dm_default_primary" "weapon_ak47"
                "dm_default_secondary" "weapon_p250"
            }
        }
Support:
Any support for how to create new modes and configs should be asked in the Deathmatch Advanced thread.

Credit for the MultiMode code:
backwards
Sikari

Last edited by Ejziponken; 07-11-2019 at 05:18.
Ejziponken is offline