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

[L4D2] Score/Team Manager 1.3.0


Post New Thread Reply   
 
Thread Tools Display Modes
KasperH
Senior Member
Join Date: Apr 2016
Location: Hungary
Old 10-07-2020 , 06:27   Re: [L4D2] Score/Team Manager 1.3.0
Reply With Quote #631

Quote:
Originally Posted by larrybrains View Post
Ya, so we use a Mix plugin for picking teams on my server, which means at the beginning of the game some players will be moved from the team they were on when they first loaded to a different team.

At the beginning of the next round, the game will try to put players back on their original teams, which will result in the the teams being all scrambled from what we picked at the beginning with the Mix plugin.

This Team Manager plugin has a feature in it that automatically puts players on the team they were on at the end of the previous round, which fixes the above described issue, but this new version isn't working.

Also, this isn't necessarily a result of the Last Stand update, because I just moved to using Left4dhooks and SM 1.10 on my server to prepare for the update, so I only started using your version of the plugin right after the Last Stand Update came out.
Sorry to hear that, I wish I could help you.

I just tried to make the plugin error free for l4dhooks and luckily it worked. I think my version is not even from the first post.
I only use the plugin to swap teams in versus. One day two id!ot loaded first to the next map and changed to survivor and killed the other two. (We had more points, they really wanted to win huh? lol)
And that function still works.

Hopefully somebody that can code will update this plugin.
__________________

"I've Got You In My Sights!"
KasperH is offline
larrybrains
Senior Member
Join Date: May 2017
Old 10-17-2020 , 05:27   Re: [L4D2] Score/Team Manager 1.3.0
Reply With Quote #632

I did some debugging on this and it looks like it fails to do the team placement when the left4dhooks forward: L4D_OnClearTeamScores() detects a non first map (such as c1m3) as a new campaign.

Here is the debug output at the beginning of a non-first map when the plugin fails to do team placement

PHP Code:
L 10/17/2020 02:11:04: -------- Mapchange to c1m4_atrium --------
L 10/17/2020 02:11:05: [optional/l4d2scores.smx] [SCOREFORWARDOnClearTeamScores(1)
L 10/17/2020 02:11:05: [optional/l4d2scores.smx] [SCORE] New mission detected.
L 10/17/2020 02:11:05: [optional/l4d2scores.smx] [SCORERound/Map scores have been reset.
L 10/17/2020 02:11:06: [optional/l4d2scores.smx] [SCOREFORWARDOnSetCampaignScores(1502,901)
L 10/17/2020 02:11:06: [optional/l4d2scores.smx] [SCORERound 1 startedround scoresA0B0
L 10
/17/2020 02:11:06: [optional/l4d2scores.smx] [SCOREON MAP START FUNCTION
L 10/17/2020 02:11:06: [optional/l4d2scores.smx] [SCOREMap counter now 
And here is the debug output at the beginning of a non-first map when the plugin successfully does team placement:
PHP Code:
L 10/16/2020 23:59:55: -------- Mapchange to c12m3_bridge --------
L 10/16/2020 23:59:56: [optional/l4d2scores.smx] [SCOREFORWARDOnSetCampaignScores(366,430)
L 10/16/2020 23:59:56: [optional/l4d2scores.smx] [SCORERound 1 startedround scoresA0B0
L 10
/16/2020 23:59:56: [optional/l4d2scores.smx] [SCOREFORWARDOnClearTeamScores(0)
L 10/16/2020 23:59:56: [optional/l4d2scores.smx] [SCOREON MAP START FUNCTION
L 10/16/2020 23:59:56: [optional/l4d2scores.smx] [SCOREMap counter now 

So in the failed instance on c1m4_atrium, FORWARD: OnClearTeamScores(1), where 1 is bool:newCampaign, shouldn't this be 0 on non-first maps?

As far as I can tell, that bool value isn't being set from anywhere within the plugin.

Last edited by larrybrains; 10-17-2020 at 05:31.
larrybrains is offline
larrybrains
Senior Member
Join Date: May 2017
Old 10-24-2020 , 17:01   Re: [L4D2] Score/Team Manager 1.3.0
Reply With Quote #633

New version attached based on KasperH's version with fix for team scramble after using a plugin like l4d2_mix.sp to pick teams.

Also updated some deprecated functions and removed the version checking for left4downtown as well as removed the need for the plugin to have it's own gamedata file as all of the natives/forwards are now handled by left4dhooks.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2scores.sp - 153 views - 54.8 KB)
File Type: smx l4d2scores.smx (23.2 KB, 119 views)

Last edited by larrybrains; 10-24-2020 at 17:05.
larrybrains is offline
KasperH
Senior Member
Join Date: Apr 2016
Location: Hungary
Old 11-18-2020 , 06:45   Re: [L4D2] Score/Team Manager 1.3.0
Reply With Quote #634

Quote:
Originally Posted by larrybrains View Post
New version attached based on KasperH's version with fix for team scramble after using a plugin like l4d2_mix.sp to pick teams.

Also updated some deprecated functions and removed the version checking for left4downtown as well as removed the need for the plugin to have it's own gamedata file as all of the natives/forwards are now handled by left4dhooks.
Nice Job! Definitely gonna try it.
__________________

"I've Got You In My Sights!"
KasperH is offline
LordVGames
Junior Member
Join Date: Mar 2021
Old 02-08-2022 , 20:51   Re: [L4D2] Score/Team Manager 1.3.0
Reply With Quote #635

Quote:
Originally Posted by larrybrains View Post
New version attached based on KasperH's version with fix for team scramble after using a plugin like l4d2_mix.sp to pick teams.

Also updated some deprecated functions and removed the version checking for left4downtown as well as removed the need for the plugin to have it's own gamedata file as all of the natives/forwards are now handled by left4dhooks.
Getting an error with this and the latest left4dhooks, running on sourcemod version 1.10.0.6503 and metamod version 1.11.0-dev+1144. Not sure if this makes it a problem with left4dhooks, or this plugin.

Found the problem, plugin was getting the names of signatures wrong. All of signature names seemed to be wrong when using left4dhooks' signatures, so I plugged them in, and it seems to be working great now! The plugin's source + compiled smx are attached.
Attached Files
File Type: smx l4d2scores.smx (24.5 KB, 108 views)
File Type: sp Get Plugin or Get Source (l4d2scores.sp - 137 views - 54.6 KB)

Last edited by LordVGames; 02-09-2022 at 03:50. Reason: Found and fixed the issue with the plugin myself.
LordVGames is offline
etozhesandy
Junior Member
Join Date: Jul 2023
Old 02-04-2024 , 07:24   Re: [L4D2] Score/Team Manager 1.3.0
Reply With Quote #636

Quote:
Originally Posted by LordVGames View Post
Getting an error with this and the latest left4dhooks, running on sourcemod version 1.10.0.6503 and metamod version 1.11.0-dev+1144. Not sure if this makes it a problem with left4dhooks, or this plugin.

Found the problem, plugin was getting the names of signatures wrong. All of signature names seemed to be wrong when using left4dhooks' signatures, so I plugged them in, and it seems to be working great now! The plugin's source + compiled smx are attached.
Can you help and fix the errors?
L 02/04/2024 - 12:21:45: [SM] Exception reported: Client index 0 is invalid
L 02/04/2024 - 12:21:45: [SM] Blaming: l4d2_storm.smx
L 02/04/2024 - 12:21:45: [SM] Call stack trace:
L 02/04/2024 - 12:21:45: [SM] [0] IsFakeClient
L 02/04/2024 - 12:21:45: [SM] [1] Line 1015, C:\Servers\L4D2\left4dead2\addons\sourcemod\s cripting\l4d2_storm.sp::Event_PlayerSpawn
L 02/04/2024 - 12:21:45: [SM] [3] SDKCall
L 02/04/2024 - 12:21:45: [SM] [4] Line 360, F:\Stuff\EVERYTHING ELSE\Left 4 Dead 2 Dedicated Servers\left4dead2\addons\sourcemod\scripting \l4d2scores.sp::L4D2_DirectorSwapTeams
L 02/04/2024 - 12:21:45: [SM] [5] Line 899, F:\Stuff\EVERYTHING ELSE\Left 4 Dead 2 Dedicated Servers\left4dead2\addons\sourcemod\scripting \l4d2scores.sp::OnMapEnd
L 02/04/2024 - 12:21:48: Error log file session closed.

Last edited by etozhesandy; 02-04-2024 at 07:26.
etozhesandy is offline
Reply


Thread Tools
Display Modes

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 04:23.


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