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

HELP - server.cfg L4D2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
El_Novato
Junior Member
Join Date: Apr 2020
Old 11-22-2021 , 14:27   HELP - server.cfg L4D2
Reply With Quote #1

Good morning everyone.

They know the name or where I could get a plugin that changes the server.cfg.
I mean that any user chooses a game mode or mutation, make that vote and when you start that mode change the cfg of the server to that mode, I don't know if you let me understand.

I found similar plugins but they are not what I need, I already looked for days but I can not find it

Help
El_Novato is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-22-2021 , 14:32   Re: HELP - server.cfg L4D2
Reply With Quote #2

this is called match mode something like that
I think competitive servers has this option
but I don't know the plugin name
__________________
Marttt is offline
El_Novato
Junior Member
Join Date: Apr 2020
Old 11-22-2021 , 14:39   Re: HELP - server.cfg L4D2
Reply With Quote #3

Quote:
Originally Posted by Marttt View Post
this is called match mode something like that
I think competitive servers has this option
but I don't know the plugin name
Thank you.
I am using this plugin which is called l4d_votemode.
But I don't know how to make it do that function
The matchmode does not run on the server, I already tested it called match vote.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_votemode.sp - 99 views - 19.7 KB)
El_Novato is offline
El_Novato
Junior Member
Join Date: Apr 2020
Old 11-25-2021 , 13:06   CLOSED
Reply With Quote #4

Quote:
Originally Posted by El_Novato View Post
Good morning everyone.

They know the name or where I could get a plugin that changes the server.cfg.
I mean that any user chooses a game mode or mutation, make that vote and when you start that mode change the cfg of the server to that mode, I don't know if you let me understand.

I found similar plugins but they are not what I need, I already looked for days but I can not find it

Help
El_Novato is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 11-27-2021 , 16:01   Re: HELP - server.cfg L4D2
Reply With Quote #5

This plugin execute config file on map change, by name which mp_gamemode is currently.

example: map c1m2_streets coop
- on map changes server exec ...cfg/coop.cfg file.

example: map c1m2_streets survival
- on map changes server exec ...cfg/survival.cfg file.

and so on.

PHP Code:
/*
"mp_gamemode" = "coop"
 game replicated
 - Current game mode, acceptable values are coop, realism, versus, survival, scavenge and holdout; changed using map command, eg: map mapname versus
 
 
 Plugin will execute config file by mp_gamemode name
 ...cfg/coop.cfg
 ...cfg/realism.cfg
 ...cfg/versus.cfg
 ...cfg/survival.cfg
 ...cfg/scavenge.cfg
 ...cfg/holdout.cfg
 
*/


char modes[][] = {
    
"coop",
    
"realism",
    
"versus",
    
"survival",
    
"scavenge",
    
"holdout"
};

ConVar mp_gamemode;

public 
void OnPluginStart()
{

    
mp_gamemode FindConVar("mp_gamemode");
    
    if(
mp_gamemode == nullSetFailState("cvar mp_gamemode not found in this game.");
}


public 
void OnConfigsExecuted()
{
    
char buffer[MAX_NAME_LENGTH];
    
mp_gamemode.GetString(buffersizeof(buffer));
    
    if(
strlen(buffer) > 1)
    {
        for(
int x 0sizeof(modes); x++)
        {
            if(
StrEqual(buffermodes[x], false))
            {
                
ServerCommand("exec %s.cfg"buffer);
            }
        }
    }

But sounds like you want Vote plugin which change game mode ? Nothing to do with server.cfg ?

If that's so, Valve maybe have made changes in L4D2 game and changelevel not change game mode anymore.
You need use map command, but this will disconnect server and start over.
- What you need to do is find Vote plugin which reconnect players at same time when map command is executed.
Bacardi is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-28-2021 , 02:31   Re: HELP - server.cfg L4D2
Reply With Quote #6

Quote:
Originally Posted by El_Novato View Post
Thank you.
I am using this plugin which is called l4d_votemode.
Please link to the plugin instead of posting the source, otherwise if the plugin updates you'll be distributing an old version. Thanks.

https://forums.alliedmods.net/showthread.php?t=179279
__________________
Silvers 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 19:01.


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