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

[L4D2] How to get team score values


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
luncheater
New Member
Join Date: Sep 2023
Old 09-20-2023 , 22:13   [L4D2] How to get team score values
Reply With Quote #1

hello, I am quite new to scripting in sourcemod and I have had some trouble in the Versus mode. I am unable to get the team score value of the Survivor or Infected team.

For example, if it is map 3 of a campaign and team Survivors has a score of 600 and team Infected has a score of 800, I want to get the exact value of either team and have it as an int variable.

What would be the best way to do this?

Last edited by luncheater; 09-20-2023 at 22:15.
luncheater is offline
Peter Brev
Member
Join Date: Aug 2023
Old 09-21-2023 , 08:58   Re: [L4D2] How to get team score values
Reply With Quote #2

Would GetTeamScore be what you are looking for?
See below.

Last edited by Peter Brev; 09-21-2023 at 13:38.
Peter Brev is offline
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 09-21-2023 , 09:18   Re: [L4D2] How to get team score values
Reply With Quote #3

https://forums.alliedmods.net/showthread.php?t=321696

Native:
PHP Code:
// The campaign scores are not set until the end of round 2, use L4D_GetCampaignScores to get them earlier
native int L4D_GetTeamScore(int logical_teambool campaign_score=false); 
__________________
HarryPotter 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 22:21.


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