AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [L4D/L4D2] Return To Lobby Fix For Campaign Switching Plugins (https://forums.alliedmods.net/showthread.php?t=316913)

Psyk0tik 07-12-2019 21:51

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by MasterMind420 (Post 2658923)
yah in most cases...if there are tabs or spaces mixed into the sp it will loose indentate those lines. The .sp as is has no loose indentations, i make sure every plugin i post has 0 errors in sourcemod when compiling(using tabs for spacing not spaces). The original file has no loose indentations. He either copy and pasted something or modified the .sp before trying to compile it.

When I downloaded and opened the source file, lines 25-26 have spaces instead of tabs.

PHP Code:

    char sBuffer[64];
    
BfReadString(bfsBuffersizeof(sBuffer)); 


MasterMind420 07-12-2019 22:00

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by Crasher_3637 (Post 2658927)
When I downloaded and opened the source file, lines 25-26 have spaces instead of tabs.

PHP Code:

    char sBuffer[64];
    
BfReadString(bfsBuffersizeof(sBuffer)); 


Good catch...I didn't see that...I only compiled the version on my computer which i commented out those lines for testing. Hence never getting the loose indentation. Thanks for pointing that out :)

rikka0w0 08-04-2019 14:04

Re: [L4D/L4D2] Return To Lobby Fix
 
Hi,

I have tested the plugin on my server, at the "Vote to skip", if I press the space key, nothing happens but the server prints:
OnDisconnectToLobby (Message = )
return Plugin_Handled;
At the end, I was not sent back to the lobby. If I didn't hit the key, I still stayed in the game.

Is this considered to be the normal behavior of this plugin? I was trying to integrate this plugin with my automatic map switcher, so that at the end of a campaign, players will be sent to the next map instead of disconnected back to the lobby.

MasterMind420 08-04-2019 19:34

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by rikka0w0 (Post 2661871)
Hi,

I have tested the plugin on my server, at the "Vote to skip", if I press the space key, nothing happens but the server prints:
OnDisconnectToLobby (Message = )
return Plugin_Handled;
At the end, I was not sent back to the lobby. If I didn't hit the key, I still stayed in the game.

Is this considered to be the normal behavior of this plugin? I was trying to integrate this plugin with my automatic map switcher, so that at the end of a campaign, players will be sent to the next map instead of disconnected back to the lobby.

as far as i know...ngbuckwangs campaign shift plugin is the only public plugin that has the code that does this...are u using a public campaign changing plugin...if so maybe when i have time i can help adapt it.

rikka0w0 08-05-2019 11:15

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by MasterMind420 (Post 2661927)
as far as i know...ngbuckwangs campaign shift plugin is the only public plugin that has the code that does this...are u using a public campaign changing plugin...if so maybe when i have time i can help adapt it.

Here is my open-source campaign switcher: Improved Automatic Campaign Switcher
Source code is available here:
https://github.com/rikka0w0/l4d2_mission_manager

I need to detect "the end of a campaign", my method is to read out the description file of all installed vpks and find out the name of the last map. This works for most campaigns, but very few 3rd party campaign doesn't (e.g. tanks challenge). So I'm looking for a better way, you plugin seems to be a good start point!

MasterMind420 08-05-2019 11:29

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by rikka0w0 (Post 2662027)
Here is my open-source campaign switcher: Improved Automatic Campaign Switcher
Source code is available here:
https://github.com/rikka0w0/l4d2_mission_manager

I need to detect "the end of a campaign", my method is to read out the description file of all installed vpks and find out the name of the last map. This works for most campaigns, but very few 3rd party campaign doesn't (e.g. tanks challenge). So I'm looking for a better way, you plugin seems to be a good start point!

Code:

public void OnPluginStart()
{
        AddCommandListener(SkipOutroIntercept, "skipouttro");
        AddCommandListener(OutroDoneIntercept, "outtro_stats_done");
}

//THIS TRIGGERS WHEN ALL PLAYERS SKIP STATS AT END
public Action SkipOutroIntercept(int client, const char[] cmd, int argc)
{

}

//THIS TRIGGERS WHEN OUTRO STATS ARE DONE JUST BEFORE BUMPING PLAYERS BACK TO LOBBY
public Action OutroDoneIntercept(int client, const char[] cmd, int argc)
{
       
}


Sappykun 09-30-2020 23:09

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by MasterMind420 (Post 2662030)
Code:

public void OnPluginStart()
{
        AddCommandListener(SkipOutroIntercept, "skipouttro");
        AddCommandListener(OutroDoneIntercept, "outtro_stats_done");
}

//THIS TRIGGERS WHEN ALL PLAYERS SKIP STATS AT END
public Action SkipOutroIntercept(int client, const char[] cmd, int argc)
{

}

//THIS TRIGGERS WHEN OUTRO STATS ARE DONE JUST BEFORE BUMPING PLAYERS BACK TO LOBBY
public Action OutroDoneIntercept(int client, const char[] cmd, int argc)
{
       
}


I have been trying to modify ACS so that it displays the stats screen before switching the campaign.

The intercept for outtro_stats_done does in fact trigger after the zombie kill count is displayed, but skipouttro actually triggers when a user presses spacebar to vote skip, not when all players have voted and the credits skip is triggered.

Where did you find these commands? I am trying to find the one that is called when the stats are skipped.

MasterMind420 10-01-2020 09:09

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by Sappykun (Post 2719763)
I have been trying to modify ACS so that it displays the stats screen before switching the campaign.

The intercept for outtro_stats_done does in fact trigger after the zombie kill count is displayed, but skipouttro actually triggers when a user presses spacebar to vote skip, not when all players have voted and the credits skip is triggered.

Where did you find these commands? I am trying to find the one that is called when the stats are skipped.

its possible i was wrong about the skip outro cmd...look at ngbuckwangs campaignshift plugin...he has the code in there. it will ahow you how to use it.

CryWolf 01-09-2021 08:15

Re: [L4D/L4D2] Return To Lobby Fix
 
Does anyone have a working version of this ? because this throwns a full log of errors and does nothing, pressing space to skip, it takes me out of server to main menu screen of L4D1
Code:

L 01/08/2021 - 15:15:47: Info (map "l4d_farm01_hilltop") (file "/home/crywolf/steamcmd/l4d/left4dead/addons/sourcemod/logs/errors_20210108.log")
L 01/08/2021 - 15:15:47: [SM] Exception reported: Invalid message id supplied (-1)
L 01/08/2021 - 15:15:47: [SM] Blaming: l4d_return_to_lobby_fix.smx
L 01/08/2021 - 15:15:47: [SM] Call stack trace:
L 01/08/2021 - 15:15:47: [SM]  [0] HookUserMessage
L 01/08/2021 - 15:15:47: [SM]  [1] Line 17, E:\Source Mod\scripting\l4d_return_to_lobby_fix.sp::OnPluginStart
L 01/08/2021 - 15:15:47: [SM] Unable to load plugin "l4d_return_to_lobby_fix.smx": Error detected in plugin startup (see error logs)
L 01/08/2021 - 15:15:49: [SM] Exception reported: Invalid convar handle 0 (error 4)


darkbret 01-10-2021 00:32

Re: [L4D/L4D2] Return To Lobby Fix
 
Quote:

Originally Posted by CryWolf (Post 2731917)
Does anyone have a working version of this ? because this throwns a full log of errors and does nothing, pressing space to skip, it takes me out of server to main menu screen of L4D1

I have same problem with you.
Code:

L 01/10/2021 - 12:26:29: SourceMod error session started
L 01/10/2021 - 12:26:29: Info (map "l4d_garage01_alleys") (file "D:\New folder (2)\l4d\left4dead\addons\sourcemod\logs\errors_20210110.log")
L 01/10/2021 - 12:26:29: [SM] Exception reported: Invalid message id supplied (-1)
L 01/10/2021 - 12:26:29: [SM] Blaming: l4d_return_to_lobby_fix.smx
L 01/10/2021 - 12:26:29: [SM] Call stack trace:
L 01/10/2021 - 12:26:29: [SM]  [0] HookUserMessage
L 01/10/2021 - 12:26:29: [SM]  [1] Line 17, /home/forums/content/files/9/7/2/5/7/175987.attach::OnPluginStart
L 01/10/2021 - 12:26:29: [SM] Unable to load plugin "l4d_return_to_lobby_fix.smx": Error detected in plugin startup (see error logs)



All times are GMT -4. The time now is 22:28.

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