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

Get Team Score


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ish12321
Veteran Member
Join Date: May 2016
Old 08-20-2016 , 10:20   Get Team Score
Reply With Quote #1

Can I know how to get team scores in Counter Strike using amxmodx ?
Please avoid Orpheu if another easy way is possible as I'm not having any knowledge about these hard modules
ish12321 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-20-2016 , 10:29   Re: Get Team Score
Reply With Quote #2

Assumuing you are not using ReGameDLL, the only easy way for now is using AMXX 1.8.3-dev, then you can use directly something like:

Code:
new const scoreT  = get_gamerules_int("CHalfLifeMultiplay", "m_iNumTerroristWins"); new const scoreCT = get_gamerules_int("CHalfLifeMultiplay", "m_iNumCTWins");

Using Orpheu is not that complicated, especially what you asked has been already made somewhere.
__________________

Last edited by Arkshine; 08-20-2016 at 10:39.
Arkshine is offline
ish12321
Veteran Member
Join Date: May 2016
Old 08-20-2016 , 10:46   Re: Get Team Score
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
Assumuing you are not using ReGameDLL, the only easy way for now is using AMXX 1.8.3-dev, then you can use directly something like:

Code:
new const scoreT  = get_gamerules_int("CHalfLifeMultiplay", "m_iNumTerroristWins"); new const scoreCT = get_gamerules_int("CHalfLifeMultiplay", "m_iNumCTWins");

Using Orpheu is not that complicated, especially what you asked has been already made somewhere.
Any way in 1.8.2 ?
ish12321 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 08-20-2016 , 10:56   Re: Get Team Score
Reply With Quote #4

Why not using this and just count in 2 global variables?

Also i want to know if there should be added Bomb_defused too or ct_win will be called on defuse?
siriusmd99 is offline
ish12321
Veteran Member
Join Date: May 2016
Old 08-20-2016 , 11:14   Re: Get Team Score
Reply With Quote #5

Quote:
Originally Posted by siriusmd99 View Post
Why not using this and just count in 2 global variables?

Also i want to know if there should be added Bomb_defused too or ct_win will be called on defuse?
If there are inbuilt features why use such methods and make more complications ?
ish12321 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-20-2016 , 12:55   Re: Get Team Score
Reply With Quote #6

Quote:
Originally Posted by ish12321 View Post
Any way in 1.8.2 ?
Without using orpheu/okapi, you don't have access to this offsets. They are member of CGameRules class, so current natives can't retrieve them. No direct way for amxx < 183.
You can anyway count rounds as suggested by sirius.

Quote:
Also i want to know if there should be added Bomb_defused too or ct_win will be called on defuse?
Yeah, game prints more messages.

In case a round is ended due to objective being completed or failed:
Code:
de map:
1.Tero win: #Target_Bombed
2.CT win:  #Bomb_Defused

as map:
1.Tero win: #VIP_Assassinated
2.CT win: #VIP_Escaped

es map :
1.Tero win: #Terrorists_Escaped
2.CT win: #CTs_PreventEscape #Escaping_Terrorists_Neutralized

cs map:
1.Tero win: #Hostages_Not_Rescued
2.CT win: #All_Hostages_Rescued
In case rounds ends by team elimination:
Code:
1.Tero win: #Terrorists_Win
2.CT win: #CTs_Win
In order to properly detect what team win the round, for all objectives, all this should be taken into accout.
__________________

Last edited by HamletEagle; 08-20-2016 at 12:55.
HamletEagle is offline
ish12321
Veteran Member
Join Date: May 2016
Old 08-20-2016 , 13:21   Re: Get Team Score
Reply With Quote #7

In orpheu what could be the way
ish12321 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 08-20-2016 , 15:53   Re: Get Team Score
Reply With Quote #8

Quote:
Originally Posted by HamletEagle View Post
Code:
de map:
1.Tero win: #Target_Bombed
2.CT win:  #Bomb_Defused

as map:
1.Tero win: #VIP_Assassinated
2.CT win: #VIP_Escaped

es map :
1.Tero win: #Terrorists_Escaped
2.CT win: #CTs_PreventEscape #Escaping_Terrorists_Neutralized

cs map:
1.Tero win: #Hostages_Not_Rescued
2.CT win: #All_Hostages_Rescued
In case rounds ends by team elimination:
Code:
1.Tero win: #Terrorists_Win
2.CT win: #CTs_Win
In order to properly detect what team win the round, for all objectives, all this should be taken into accout.

So if i use only terwin and ctwin it won't catch de,es... events?

To be sure i caught perfect i must add all them in the hook?
siriusmd99 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-20-2016 , 17:41   Re: Get Team Score
Reply With Quote #9

If the target got bombed, only that event will be called and not T's win.
This also counts for hostages, vips, etc...
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 08-20-2016 , 18:52   Re: Get Team Score
Reply With Quote #10

Hamlet, what opinion do you have about this one?

Api:

PHP Code:
// Return the score of Terrorist team
native get_tt_score( );

// Return the score of Counter-Terrorist team
native get_ctt_score( ); 
Attached Files
File Type: zip TeamScoreApi.zip (1.3 KB, 386 views)

Last edited by Craxor; 08-22-2016 at 13:43.
Craxor is offline
Send a message via ICQ to Craxor
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 00:23.


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