Raised This Month: $ Target: $400
 0% 

[req] best score


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Pro
Member
Join Date: Jul 2014
Old 04-30-2015 , 08:56   [req] best score
Reply With Quote #1

i need a plugin to show best player every round (kills / hs /eff / acc)
like this one
i tried to do it from statsx but no thing
[IMG]http://s16.************/53whdt9w4/dwew3w.jpg[/IMG]
Mr.Pro is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 04-30-2015 , 10:11   Re: [req] best score
Reply With Quote #2

go to the amxmodmenu there is option in statsx menu to enable best round players
else
https://forums.alliedmods.net/showthread.php?p=2120953
__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 04-30-2015 at 10:14.
indraraj striker is offline
Mr.Pro
Member
Join Date: Jul 2014
Old 04-30-2015 , 16:21   Re: [req] best score
Reply With Quote #3

ColorChat(0, RED, "^3** ^4The best player of the round is : ^3%s !", szName)


[IMG]http://s15.************/enz2mi4p7/fbdfbgrgws.png[/IMG]
Mr.Pro is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-01-2015 , 09:27   Re: [req] best score
Reply With Quote #4

post the sma
btw i tried in my pc its k for me
[IMG]http://s18.************/zc9zlu8p5/dsas.png[/IMG]
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Mr.Pro
Member
Join Date: Jul 2014
Old 05-01-2015 , 10:36   Re: [req] best score
Reply With Quote #5

that's the code of the sma
PHP Code:
#include <amxmodx>   #include <amxmisc>   #include <hamsandwich>   #include <cstrike>   #include <ColorChat>   #define PLUGIN    "Bestplayer"   #define AUTHOR    "Morroco Amxx"   #define VERSION    "1.0"    new g_iKills[32], g_iHS[32], g_iDmg[32]    public plugin_init()   {       register_plugin(PLUGIN, VERSION, AUTHOR)              RegisterHam(Ham_TakeDamage, "player", "hamTakeDamage")       register_event("DeathMsg", "EventDeathMsg", "a")       register_logevent("RoundEnd", 2, "1=Round_End")   }   public client_disconnect(id)   {       g_iDmg[id] = 0;       g_iKills[id] = 0;       g_iHS[id] = 0;   }   public hamTakeDamage(victim, inflictor, attacker, Float:damage, DamageBits)   {       if( 1 <= attacker <= 32)       {           if(cs_get_user_team(victim) != cs_get_user_team(attacker))               g_iDmg[attacker] += floatround(damage)           else               g_iDmg[attacker] -= floatround(damage)       }   }   public EventDeathMsg()   {       new killer = read_data(1)       new victim = read_data(2)       new is_hs = read_data(3)              if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim))       {           g_iKills[killer]++;                      if(is_hs)               g_iHS[killer]++;       }       else           g_iKills[killer]--;   }   public RoundEnd()   {       new iBestPlayer = get_best_player()              new szName[32]       get_user_name(iBestPlayer, szName, charsmax(szName))       ColorChat(0, RED, "^3** ^4The best player of the round is : ^3%s !", szName)       ColorChat(0, RED, "^3** ^4He killed ^3%i ^4players with ^3%i ^4headshots.", g_iKills[iBestPlayer], g_iHS[iBestPlayer])       for(new i; i < 31; i++)       {           g_iDmg[i] = 0;           g_iHS[i] = 0;           g_iKills[i] = 0;       }   }   get_best_player()   {       new players[32], num;       get_players(players, num);       SortCustom1D(players, num, "sort_bestplayer")              return players[0]   }   public sort_bestplayer(id1, id2)   {       if(g_iKills[id1] > g_iKills[id2])           return -1;       else if(g_iKills[id1] < g_iKills[id2])           return 1;       else       {           if(g_iDmg[id1] > g_iDmg[id2])               return -1;           else if(g_iDmg[id1] < g_iDmg[id2])               return 1;           else               return 0;       }              return 0;   } 
Mr.Pro is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-01-2015 , 12:50   Re: [req] best score
Reply With Quote #6

Attach the file
and learn simple thing how to do

https://forums.alliedmods.net/showth...hlight=Locally

and

https://forums.alliedmods.net/showth...hlight=compile
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Mr.Pro
Member
Join Date: Jul 2014
Old 05-01-2015 , 15:21   Re: [req] best score
Reply With Quote #7

it Works
Mr.Pro 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 20:08.


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