Raised This Month: $ Target: $400
 0% 

FragCounter - Count more


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 11-04-2006 , 14:40   FragCounter - Count more
Reply With Quote #1

Hey guys,

Ok. I have a nice plugin that counts the frags that you do on one respawn.
Then on the left side come a green number with the kills. Thus you spawn and kill one then comes on the left side a green "1". It's really nice on a dm server. But the problem is that he only count to 9. When I have killed 9 players and then one more then there showed a 9 but I have killed 10 people. :/

Here is the plugin.
__________________
DA is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-04-2006 , 17:03   Re: FragCounter - Count more
Reply With Quote #2

ok here try this version i bumbped the stastus message number from 10 to 20 . try it out see if it works .
Attached Files
File Type: sma Get Plugin or Get Source (fragcounter.sma - 922 views - 5.4 KB)
The Specialist is offline
Send a message via AIM to The Specialist
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 11-04-2006 , 19:30   Re: FragCounter - Count more
Reply With Quote #3

Thanks. I test it.
__________________
DA is offline
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 11-05-2006 , 12:18   Re: FragCounter - Count more
Reply With Quote #4

hmm. Sorry but it works not
He count to 9 end then no more...
__________________
DA is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-05-2006 , 13:39   Re: FragCounter - Count more
Reply With Quote #5

Try this. I have no idea if StatusIcon can handle numbers over 9...

Why is everyone using
PHP Code:
register_event("SendAudio","roundend","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw"
when
PHP Code:
register_event("SendAudio""roundend""a""1=0"
is easier..?

Code:
/*AMX MOD X script ************************************************************************** *       FragCounter   V    1.01     by  Scarzzurs * * *  ******************************************************************************* *   *   Ported By KingPin( <a href="mailto:[email protected]">[email protected]</a> ). I take no responsibility *   for this file in any way. Use at your own risk. No warranties of any kind. * *  ******************************************************************************** * **********************************************************************************/ #include <amxmodx> #define MAX_KILLS   20 new pfrags[32] new top new gmsgStatusIcon public playerspawn(id) {     pfrags[id]=0     top = 0     showtimer(id,pfrags[id]) } public death() {         new killer = read_data(1)         pfrags[killer]=pfrags[killer]+1         if (pfrags[killer] >= 9 )         emit_sound(killer,CHAN_STATIC, "misc/monsterkill.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)             topplayer()     new players[32]     new player_num     get_players(players, player_num)     for (new i = 0; i < player_num; i++)         showtimer(players[i],pfrags[players[i]])     return PLUGIN_CONTINUE } public topplayer() {     new score     new players[32]     new player_num     get_players(players, player_num)     for (new i = 0; i < player_num; i++) {         if (pfrags[players[i]]>score) {             score=pfrags[players[i]]             top=players[i]         }                 else if ( pfrags[players[i]] == score )             top = 0     } } public showtimer(id,number) {         if ( ! is_user_connected(id) )         return PLUGIN_CONTINUE         for ( new i = 0 ; i < MAX_KILLS ; i++ ) {                 new status, numstr[10]                 if ( i == number ) {                         status = 1                         if ( id == top )                 status = 2         }                 formatex(numstr, 9, "number_%d", i)                 message_begin(MSG_ONE, gmsgStatusIcon, {0,0,0}, id)         write_byte(status)         write_string(numstr)         write_byte(0)         write_byte(255)         write_byte(0)         message_end()     }         return PLUGIN_CONTINUE } public roundend() {     if (top != 0){         new sname[32]         get_user_name(top,sname,32)         set_hudmessage(0, 255, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 5)         show_hudmessage(0,"Best player of the round: %s",sname)     } } public plugin_init() {     register_plugin("FragCounter","1.01","Scarzzurs")     gmsgStatusIcon = get_user_msgid("StatusIcon")     register_event("DeathMsg","death","a")     register_event("ResetHUD","playerspawn","b")     register_event("SendAudio", "roundend", "a", "1=0") } public plugin_precache() {     if ( file_exists("sound/misc/monsterkill.wav") )         precache_sound("misc/monsterkill.wav") }

Last edited by [ --<-@ ] Black Rose; 11-05-2006 at 13:42.
[ --<-@ ] Black Rose is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-05-2006 , 17:11   Re: FragCounter - Count more
Reply With Quote #6

Sorry i tried to help I thought the status message might be able to be altered appernatly not
The Specialist is offline
Send a message via AIM to The Specialist
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 11-06-2006 , 09:17   Re: FragCounter - Count more
Reply With Quote #7

hmm. The other version is buggy too. When I have 9 kills and I kille one more then the green number on the left side goes away or invisible. I can't see the number then...
__________________
DA is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-06-2006 , 10:25   Re: FragCounter - Count more
Reply With Quote #8

I know, I tested it. It didn't work, Though I think I can remember seing some kinda counter on some warcraft servers, I also think it went over 9.
[ --<-@ ] Black Rose is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-06-2006 , 14:43   Re: FragCounter - Count more
Reply With Quote #9

and technichly according to VEN, the way you went about detecting round end wasnt right either

http://forums.alliedmods.net/showthread.php?t=42159

The Specialist is offline
Send a message via AIM to The Specialist
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 11-06-2006 , 15:00   Re: FragCounter - Count more
Reply With Quote #10

Quote:
Originally Posted by The Specialist View Post
and technichly according to VEN, the way you went about detecting round end wasnt right either

http://forums.alliedmods.net/showthread.php?t=42159

It doesn't say ANYWHERE that my way of doing it is wrong... it isn't even mentioned...
[ --<-@ ] Black Rose 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 04:56.


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