Raised This Month: $ Target: $400
 0% 

[HELP] Best Player of the Round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
extream87
Senior Member
Join Date: Aug 2011
Old 12-12-2013 , 09:16   [HELP] Best Player of the Round
Reply With Quote #1

What is wrong with this code?
When the round ends only appears: Best Player: nothing more

Code:
#include <amxmodx> #include <cstrike> #define PLUGIN "Best Player" #define VERSION "1.0" #define AUTHOR "pauSe" #define IsPlayer(%1)    (1 <= %1 <= gMaxPlayers) new gKills[33] new gMaxPlayers public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_logevent("RoundStart", 2, "1=Round_Start")     register_logevent("RoundEnd", 2, "1=Round_End")         register_event("DeathMsg", "FwdDeathMsgEvent", "a")         gMaxPlayers = get_maxplayers() } public client_connect(id)     gKills[id] = 0     public DeathMsg() {     new attacker = read_data(1)     new victim = read_data(2)         if(attacker != victim && cs_get_user_team(attacker) != cs_get_user_team(victim) && IsPlayer(attacker))         gKills[attacker]++ } public RoundStart()     arrayset(gKills, 0, 33) public RoundEnd() {     new name[34]     new bestplayer, bestscore         for(new i; i < sizeof(gKills); i++)     {         if(gKills[i] > bestscore)         {             bestplayer = i             bestscore = gKills[i]         }     }         get_user_name(bestplayer, name, 33)         set_hudmessage(255, 0, 0, -1.0, 0.01)     show_hudmessage(0, "Best Player: %s ^nKills: %i", name, bestscore) }
extream87 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 20:32.


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