Raised This Month: $32 Target: $400
 8% 

show top5 stats display


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yunuss85
Member
Join Date: Dec 2015
Location: Istanbul
Old 08-28-2016 , 08:37   show top5 stats display
Reply With Quote #1

hi all,

could show top 15 stats, Is it possible to show the top 5 players

sample link: http://i.hizliresim.com/1vg21A.jpg

Thx,
__________________
yunuss85 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-28-2016 , 16:07   Re: show top5 stats display
Reply With Quote #2

Tested

PHP Code:
#include <amxmodx>
#include <csstats>

#define PLUGIN "Top5 with Hud"
#define VERSION "1.0"
#define AUTHOR "EFFx"

#define MAX_NAME_LENGTH         31
#define MAX_BUFFER_LENGTH       2047

new szHudTop5

new g_sBuffer[MAX_BUFFER_LENGTH 1]                = ""
new t_sName[MAX_NAME_LENGTH 1]                    = ""

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
szHudTop5 CreateHudSyncObj()
    
    
register_clcmd("say /top15","CmdTop15")
}
public 
CmdTop5(id)
{
    
format_top5(g_sBuffer)
    
    
set_hudmessage(255,255,255,0.70,0.30,0,1.0,1.0)
    
ShowSyncHudMsg(idszHudTop5,g_sBuffer)
}
format_top5(sBuffer[MAX_BUFFER_LENGTH 1])
{
    new 
iMax get_statsnum()
    new 
izStats[8], izBody[8]
    new 
iLen 0

    
if (iMax 5)
        
iMax 5

    
for (new 0iMax && MAX_BUFFER_LENGTH iLen 0i++)
    {
        
get_stats(iizStatsizBodyt_sNameMAX_NAME_LENGTH)
        
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH iLen"%2d-%-22.22s^n"1t_sName)
    }

Edited from statsx.sma
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 08-30-2016 at 17:00.
EFFx is offline
yunuss85
Member
Join Date: Dec 2015
Location: Istanbul
Old 08-30-2016 , 05:55   Re: show top5 stats display
Reply With Quote #3

server in upload sma,It gave this error:

PHP Code:
//cstrike/addons/amxmodx/scripting/mpstatsx.sma(25) : error 017: undefined symbol "szHudTop5"
//cstrike/addons/amxmodx/scripting/mpstatsx.sma(25) : warning 215: expression has no effect
//cstrike/addons/amxmodx/scripting/mpstatsx.sma(25) : error 001: expected token: ";", but found ")"
//cstrike/addons/amxmodx/scripting/mpstatsx.sma(25) : error 029: invalid expression, assumed zero
//cstrike/addons/amxmodx/scripting/mpstatsx.sma(25) : fatal error 107: too many error messages on one line 
__________________
yunuss85 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-30-2016 , 17:01   Re: show top5 stats display
Reply With Quote #4

LOL, what i made, sry. Try again.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Reply


Thread Tools
Display Modes

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:45.


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