Raised This Month: $ Target: $400
 0% 

"Frag" counter on every round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 07-20-2013 , 01:56   Re: "Frag" counter on every round
Reply With Quote #2

i wasnt going to fix your code for you as its not good. instead i wrote one up for you... and put some notes in it... im not the best at explaining things but hope you can understand.

Code:
/*     Blizzards Plugins Comply With GNU General Public License     Frag Counter is free software: you can redistribute it and/or modify     it under the terms of the GNU General Public License as published by     the Free Software Foundation, either version 3 of the License, or     (at your option) any later version.         Under no circumstances are you allowed to redistribute and/or modify     it claming that you are the original author of such plugin/modification.         Frag Counter is distributed in the hope that it will be useful,     but WITHOUT ANY WARRANTY; without even the implied warranty of     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     GNU General Public License for more details.         You should have received a copy of the GNU General Public License     along with this program.  If not, see <http://www.gnu.org/licenses/>.     */ #include < amxmodx > #include < amxmisc > #include < hamsandwich > #pragma semicolon 1 #define PLUGIN "Frag Counter" #define VERSION "1.0" #define AUTHOR "Blizzard" new g_iFrags[ 33 ]; // This Holds Players Kill Count public plugin_init( ) {     register_plugin( PLUGIN, VERSION, AUTHOR );         RegisterHam( Ham_Spawn, "player", "CBase_PlayerPre_Spawn", 0 );     register_event( "DeathMsg", "Event_DeathMsg", "a" ); } public client_putinserver( id ) {     set_task( 0.9, "Frag_Hud", id, _, _, "b" ); // Sets The Loop Task For Hud } public CBase_PlayerPre_Spawn( id ) {     arrayset( g_iFrags, 0, sizeof( g_iFrags ) ); // This Resets Players Frag Count To 0 Only For HUD Does Not Affect ScoreBoard } public Event_DeathMsg( ) {     new iKiller = read_data( 1 );     new iVictim = read_data( 2 );         if( iVictim != iKiller ) {         g_iFrags[ iKiller ]++; // This Adds +1 To A Persons Frag Count For HUD     } } public Frag_Hud( id ) {     set_hudmessage(255, 255, 255, 0.01, 0.18, 0, 0.0, 1.0, 0.0, 0.0, -1 );     show_hudmessage(id, "Round Stats:^nFrags %i", g_iFrags[ id ] ); }

or you could simply get the plugin from link below
Attached Files
File Type: sma Get Plugin or Get Source (frags-counter.sma - 993 views - 1.9 KB)
__________________
Blizzard_87 is offline
 



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 06:27.


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