Raised This Month: $51 Target: $400
 12% 

[L4D/L4D2] Return To Lobby Fix For Campaign Switching Plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 07-12-2019 , 21:51   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #11

Quote:
Originally Posted by MasterMind420 View Post
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)); 
__________________
Psyk0tik is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 07-12-2019 , 22:00   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #12

Quote:
Originally Posted by Crasher_3637 View Post
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
MasterMind420 is offline
rikka0w0
Member
Join Date: May 2018
Location: Sydney, Australia / Beij
Old 08-04-2019 , 14:04   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #13

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.
__________________
rikka0w0 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 08-04-2019 , 19:34   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #14

Quote:
Originally Posted by rikka0w0 View Post
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.
MasterMind420 is offline
rikka0w0
Member
Join Date: May 2018
Location: Sydney, Australia / Beij
Old 08-05-2019 , 11:15   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #15

Quote:
Originally Posted by MasterMind420 View Post
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!
__________________
rikka0w0 is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 08-05-2019 , 11:29   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #16

Quote:
Originally Posted by rikka0w0 View Post
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)
{
	
}
MasterMind420 is offline
Sappykun
Member
Join Date: Nov 2019
Old 09-30-2020 , 23:09   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #17

Quote:
Originally Posted by MasterMind420 View Post
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.

Last edited by Sappykun; 09-30-2020 at 23:13.
Sappykun is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 10-01-2020 , 09:09   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #18

Quote:
Originally Posted by Sappykun View Post
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.
MasterMind420 is offline
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 01-09-2021 , 08:15   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #19

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)
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
darkbret
Junior Member
Join Date: Sep 2019
Old 01-10-2021 , 00:32   Re: [L4D/L4D2] Return To Lobby Fix
Reply With Quote #20

Quote:
Originally Posted by CryWolf View Post
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)
darkbret 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:32.


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