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

DOD:S GetTeamScore()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
And_One
Junior Member
Join Date: Sep 2005
Old 02-08-2009 , 13:43   DOD:S GetTeamScore()
Reply With Quote #1

i try to write a function like this:

public OnMapEnd()
{
.....
new iAxisScore = GetTeamScore(AXIS);
....
SaveScores(iAxisScore,iAllyScore,iAxisTickpoi nts,iAllyTickpoints);
}

what i want to know is the final fullcap score and the tickpoints (per team)

how can i get the tickpoints ? is there any summary call? i know it is in the scoreboard, but i dont know how to get it from there. any help appreciated!
And_One is offline
Send a message via ICQ to And_One
FeuerSturm
AlliedModders Donor
Join Date: Apr 2004
Old 02-10-2009 , 00:47   Re: DOD:S GetTeamScore()
Reply With Quote #2

The easiest way is to "count" the round wins with code similar to this:

PHP Code:
#define ALLIES 2
#define AXIS 3
 
new iAllyScore 0iAxisScore 0
 
public OnPluginStart()
{
 
HookEventEx("dod_round_win"OnRoundWinEventHookMode_Post)
}
 
public 
OnMapStart()
{
 
iAllyScore 0
 iAxisScore 
0
}
 
public 
OnMapEnd()
{
 
SaveScores(iAxisScoreiAllyScoreiAxisTickpointsiAllyTickpoints)
}
 
public 
Action:OnRoundWin(Handle:event, const String:name[], bool:dontBroadcast)
{
 new 
Winner GetEventInt(event"team")
 if(
Winner == ALLIES)
 {
  
iAllyScore++
 }
 else if(
Winner == AXIS)
 {
  
iAxisScore++
 }
 return 
Plugin_Continue

Let me know if you're having problems
FeuerSturm is offline
And_One
Junior Member
Join Date: Sep 2005
Old 02-16-2009 , 07:56   Re: DOD:S GetTeamScore()
Reply With Quote #3

thx, i have a working version now, which shows the current scores in the hostname!
And_One is offline
Send a message via ICQ to And_One
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 12:35.


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