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

Team Score Info


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Statistical       
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-16-2005 , 21:48   Team Score Info
Reply With Quote #1

Code:
/* AMX MOD X Script (c) 2005 Zenith77 * **THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES** * * Plugin By Zenith77 * --| DESCRIPTION |-- * * This plugin simpley displays to the client every round on freezetime if their * team is winning or losing and both teams score...... * E.G : * Your team is losing by 4 * CT Score : 4 * Terr Score 0 * * --| REQUIREMENTS |-- * **** *  You must have the CS HACK Module installed, you can find it here, <a href="http://forums.alliedmods.net/showthread.php?t=8230" target="_blank" rel="nofollow noopener">http://forums.alliedmods.net/showthread.php?t=8230</a> * **** * --| COMMANDS |-- * * None, just sit back and relaxe ;) * * --| VERSIONS |-- * * V. 1.0 -- Release * * * --| TO DO |-- * V. 2.0 -- Add client info if requested * * --| OTHER NOTES |-- * ********* * THIS WILL NOT WORK WITH AMXX 1.50 * ********* */ /*  --| BEGIN FILE |--  */ #include <amxmodx> #include <cstrike> #include <cshack> public plugin_init() {     register_plugin( "Team Score Info", "1.0", "Zenith77" )     register_event( "ResetHUD", "end_round","b" ) } public end_round(id) {     new T_Score     new CT_Score     new result                 T_Score = cs_get_team_score( 1 ) // this has to be 1 not CS_TEAM_CT     CT_Score = cs_get_team_score( 2 ) // this has to be 2 not CS_TEAM_T         new CsTeams:team     team = cs_get_user_team(id)         if( team == CS_TEAM_SPECTATOR ) {         set_hudmessage( 0, 0, 1000, 0.0, 0.0, 1, 10.0, 11.0, 0.1, 0.2, 4 )            show_hudmessage( id, "CT Score : %d^n  Terr Score : %d^n ", CT_Score, T_Score )              }         if( team == CS_TEAM_T ) {         if( T_Score > CT_Score ) {                         result = T_Score - CT_Score             set_hudmessage( 0, 0, 1000, 0.0, 0.0, 1, 10.0, 11.0, 0.1, 0.2, 4 )                show_hudmessage( id, "Your Team is winning by %d^n  CT Score : %d^n  Terr Score : %d^n ", result, CT_Score, T_Score )         }                 if( T_Score < CT_Score ) {                         result = CT_Score - T_Score             set_hudmessage( 0, 0, 1000, 0.0, 0.0, 1, 10.0, 11.0, 0.1, 0.2, 4 )                show_hudmessage( id, "Your Team is losing by %d^n  CT Score : %d^n  Terr Score : %d^n", result, CT_Score, T_Score )         }                 if( T_Score == CT_Score ) {                         set_hudmessage( 0, 0, 1000, 0.0, 0.0, 1, 10.0, 11.0, 0.1, 0.2, 4 )                show_hudmessage( id, "Both Teams are Tied!^n CT Score : %d^n Terr Score : %d^n ", CT_Score, T_Score )         }     }     if( team == CS_TEAM_CT ) {         if( CT_Score > T_Score ) {                         result = CT_Score - T_Score             set_hudmessage( 0, 0, 1000, 0.0, 0.0, 1, 10.0, 11.0, 0.1, 0.2, 4 )                show_hudmessage(id, "Your Team is Winning by %d^n CT Score : %d^n Terr Score : %d^n", result, CT_Score, T_Score )         }                 if ( CT_Score < T_Score ) {                         result = T_Score - CT_Score             set_hudmessage( 0, 0, 1000, 0.0, 0.0, 1, 10.0, 11.0, 0.1, 0.2, 4 )                show_hudmessage(id, "Your Team is losing by %d^n CT Score : %d^n Terr Score : %d^n ", result, CT_Score, T_Score )         }                         if( CT_Score == T_Score ) {             set_hudmessage( 0, 0, 1000, 0.0, 0.0, 1, 10.0, 11.0, 0.1, 0.2, 4 )                show_hudmessage(id, "Both Teams are Tied!^n CT Score : %d^n Terr Score : %d^n", CT_Score, T_Score )         }             }     } /*  --| END FILE |--  */

on a side note : not to sure about the color blue though, cant it only go to 255?
Attached Files
File Type: sma Get Plugin or Get Source (team_score_info.sma - 859 views - 3.0 KB)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 08-16-2005 , 22:56  
Reply With Quote #2

looks like a nice simple addon. Nice Job, im not goona test it tho, i really dont care too much for team scores, i usually just play for fun or to talk to people i know, other than that, im not too serious. Good Work tho
__________________
bmann_420 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-17-2005 , 16:02  
Reply With Quote #3

thnx...
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
ApeX
Junior Member
Join Date: Jun 2005
Old 08-17-2005 , 22:00  
Reply With Quote #4

so just like in DoD

Sorry, this plugin failed to compile!
You should try notifying the author so they can fix this.
ApeX is offline
Blitz
Senior Member
Join Date: Jul 2005
Location: Google
Old 08-18-2005 , 04:38  
Reply With Quote #5

Quote:
Originally Posted by ApeX
Sorry, this plugin failed to compile!
You should try notifying the author so they can fix this.
No.
It is using the CS Hack Module.
Compile it yourself.
__________________
[img]http://img268.**************/img268/7071/blitz4ek.jpg[/img]

In the beginning, God created the search button.
Blitz is offline
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 08-18-2005 , 11:58  
Reply With Quote #6

i would hook the actual round end instead of ResetHud
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-19-2005 , 20:40  
Reply With Quote #7

how?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-19-2005 , 21:08  
Reply With Quote #8

Code:
public plugin_init() {     register_plugin( "Team Score Info", "1.0", "Zenith77" )     register_event( "ResetHUD", "end_round","b" ) }

To

Code:
public plugin_init() {     register_plugin( "Team Score Info", "1.0", "Zenith77" )     register_event( "Round_Start", "end_round","a" ) }

If I'm not mistaken.

Oh, on a side note Zenith, I would also like to point out that you suck.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Blitz
Senior Member
Join Date: Jul 2005
Location: Google
Old 08-19-2005 , 22:23  
Reply With Quote #9

I've never heard of "Round_Start" event. I may be wrong.
__________________
[img]http://img268.**************/img268/7071/blitz4ek.jpg[/img]

In the beginning, God created the search button.
Blitz is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-19-2005 , 22:30  
Reply With Quote #10

I saw it somewhere, forgot, it might be RoundStart or something like that.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
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 03:26.


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