Raised This Month: $12 Target: $400
 3% 

plugin Requests


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yunuss85
Member
Join Date: Dec 2015
Location: Istanbul
Old 05-18-2017 , 03:52   plugin Requests
Reply With Quote #1

hello, cs.1.6 amx 1.8.3 plugin need to help.

I want to list top5 of the server under the radar box shown on top left of the game, and i want it to be reset in every new map. Do you have a plugin?

thank you for your help.
__________________
yunuss85 is offline
Yassinec
Member
Join Date: May 2017
Old 05-18-2017 , 14:29   Re: plugin Requests
Reply With Quote #2

Dеѕсrірtіоn: НUD ѕtаtіѕtісѕ аt thе tор оf thе ѕсrееn thе рlауеr.
[К: 10 | D: 35 | Нѕ: 1 | КD Rаtіо: 10%]

Соmmаndѕ:
аmх_dіѕрlау 1/0 іnсl. Оn / оff.





Code:
/*
Plugin Name: Stats Display
Author: Kensai

Description
Shows a Constant HUD display of a player's Name, Kills, Deaths, and Headshots.
Stats are retrieved from the server's stats file. SO if the server saves stats by IP, these stats are shown by IP.
Steam ID, is probably the most reliable, due to dynamic IP's.

Changelog
v1.3 - Added a Kill Death Ratio
v1.2 - Added CVAR
v1.1 - Made HUD message longer, so longer names fit, abbreviated stats
v1.0 - First version
*/

#include <amxmodx>
#include <amxmisc>
#include <csstats>

#define HUD_INTERVAL 1.0

new msgtext 

public plugin_init() 
{
	register_plugin("Stats Display","1.3","Kensai")
	
	register_cvar("amx_display","1")
	msgtext = get_user_msgid("StatusText") 
}

public client_putinserver(id)
{	
	if(get_cvar_num("amx_display") == 0)
	return PLUGIN_HANDLED
	
	set_task(HUD_INTERVAL,"ShowHUD",id)
	return PLUGIN_CONTINUE
}

public ShowHUD(id)     
{  
	if(get_cvar_num("amx_display") == 0)
	return PLUGIN_HANDLED
	
	if(!is_user_connected(id))
		return 0;
	
	new stats[8]
	new hits[8]
	get_user_stats(id,stats,hits)	
	
	new name[33]
	get_user_name(id,name,32)
	
	new HUD[101] 
	
	format(HUD, 100, "%s [K: %i|D: %i|Hs: %i|KD Ratio: %i]",name,stats[0],stats[1],stats[2],stats[0]/stats[1])
	message_begin(MSG_ONE, msgtext, {0,0,0}, id)  
	write_byte(0)  
	write_string(HUD)  
	message_end()  
	
	set_task(HUD_INTERVAL,"ShowHUD",id);
	
	return PLUGIN_CONTINUE
}
__________________
Steam:Yassinec
Yassinec is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-18-2017 , 20:05   Re: plugin Requests
Reply With Quote #3

Quote:
Originally Posted by Yassinec View Post
Dеѕсrірtіоn: НUD ѕtаtіѕtісѕ аt thе tор оf thе ѕсrееn thе рlауеr.
[К: 10 | D: 35 | Нѕ: 1 | КD Rаtіо: 10%]

Соmmаndѕ:
аmх_dіѕрlау 1/0 іnсl. Оn / оff.





Code:
/*
Plugin Name: Stats Display
Author: Kensai

Description
Shows a Constant HUD display of a player's Name, Kills, Deaths, and Headshots.
Stats are retrieved from the server's stats file. SO if the server saves stats by IP, these stats are shown by IP.
Steam ID, is probably the most reliable, due to dynamic IP's.

Changelog
v1.3 - Added a Kill Death Ratio
v1.2 - Added CVAR
v1.1 - Made HUD message longer, so longer names fit, abbreviated stats
v1.0 - First version
*/

#include <amxmodx>
#include <amxmisc>
#include <csstats>

#define HUD_INTERVAL 1.0

new msgtext 

public plugin_init() 
{
	register_plugin("Stats Display","1.3","Kensai")
	
	register_cvar("amx_display","1")
	msgtext = get_user_msgid("StatusText") 
}

public client_putinserver(id)
{	
	if(get_cvar_num("amx_display") == 0)
	return PLUGIN_HANDLED
	
	set_task(HUD_INTERVAL,"ShowHUD",id)
	return PLUGIN_CONTINUE
}

public ShowHUD(id)     
{  
	if(get_cvar_num("amx_display") == 0)
	return PLUGIN_HANDLED
	
	if(!is_user_connected(id))
		return 0;
	
	new stats[8]
	new hits[8]
	get_user_stats(id,stats,hits)	
	
	new name[33]
	get_user_name(id,name,32)
	
	new HUD[101] 
	
	format(HUD, 100, "%s [K: %i|D: %i|Hs: %i|KD Ratio: %i]",name,stats[0],stats[1],stats[2],stats[0]/stats[1])
	message_begin(MSG_ONE, msgtext, {0,0,0}, id)  
	write_byte(0)  
	write_string(HUD)  
	message_end()  
	
	set_task(HUD_INTERVAL,"ShowHUD",id);
	
	return PLUGIN_CONTINUE
}
He didn't ask for that.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
yunuss85
Member
Join Date: Dec 2015
Location: Istanbul
Old 05-19-2017 , 02:17   Re: plugin Requests
Reply With Quote #4

exp. screen:
__________________

Last edited by yunuss85; 05-19-2017 at 02:21.
yunuss85 is offline
Yassinec
Member
Join Date: May 2017
Old 05-19-2017 , 20:24   Re: plugin Requests
Reply With Quote #5

try this one

Code:
#include <amxmodx>
#include <csx>
#define PLUGIN "Best Round Players Top 3"
#define VERSION "0.0.2"
enum _:CSX_STATS
{
    STATS_KILLS,
    STATS_DEATHS,
    STATS_HS,
    STATS_TKS,
    STATS_SHOTS,
    STATS_HITS,
    STATS_DAMAGE,
    STATS_DUMMY
}
enum _:mDatas
{
    m_iPlayerIndex,
    m_iPlayerStats[CSX_STATS]
}
public plugin_init()
{
    register_plugin( PLUGIN, VERSION, "ConnorMcLeod" )
    register_logevent("Event_Round_End", 2, "1=Round_End")
}
public Event_Round_End()
{
    new playersStats[32][mDatas]
    new players[32], num, player, i, stats[CSX_STATS], bodyhits[8]
    get_players(players, num, "ch")
    if( !num )
    {
        return
    }
    for(i=0; i<num; i++)
    {
        player = players[i]
        get_user_stats(player, stats, bodyhits)
        playersStats[i][m_iPlayerIndex] = player
        playersStats[i][m_iPlayerStats] = stats
    }
    SortCustom2D(playersStats, num, "SortHandler")
    if( num > 3 )
    {
        num = 3
    }
    new szMsg[512], szName[32], n = formatex(szMsg, charsmax(szMsg), "Best Round Players :^n^n")
    
    for(i=0; i<num; i++)
    {
        get_user_name(playersStats[i][m_iPlayerIndex], szName, charsmax(szName))
        n += formatex(szMsg[n], charsmax(szMsg)-n, "%d. ^"%s^" (%d Kills) (%d Damage)^n", i+1, szName, playersStats[i][m_iPlayerStats][STATS_KILLS], playersStats[i][m_iPlayerStats][STATS_DAMAGE])
    }
    set_hudmessage(0, 80, 180, -1.0, 0.10, 0, 0.1, 5.0, 0.1, 0.1, -1)
    show_hudmessage(0, szMsg)
}
public SortHandler(elem1[mDatas], elem2[mDatas], tempPlayersStats[32][mDatas])
{
    new kills1 = elem1[m_iPlayerStats][STATS_KILLS], kills2 = elem2[m_iPlayerStats][STATS_KILLS]
    if( kills1 > kills2 )
    {
        return -1
    }
    else if( kills1 < kills2 )
    {
        return 1
    }
    new dmg1 = elem1[m_iPlayerStats][STATS_DAMAGE], dmg2 = elem2[m_iPlayerStats][STATS_DAMAGE]
    if( dmg1 > dmg2 )
    {
        return -1
    }
    else if( dmg1 < dmg2 )
    {
        return 1
    }
    return 0
}
__________________
Steam:Yassinec
Yassinec is offline
yunuss85
Member
Join Date: Dec 2015
Location: Istanbul
Old 05-20-2017 , 02:42   Re: plugin Requests
Reply With Quote #6

It was not what I wanted: Shown in the middle,hud top3 and it is not fixed.

-Can you put it under the radar box? It should always stay under the radar box.
-If the map is updated, top3 will be updated.


As in this picture:



Yassinec ,thank you so much.
__________________
yunuss85 is offline
yunuss85
Member
Join Date: Dec 2015
Location: Istanbul
Old 05-22-2017 , 06:29   Re: plugin Requests
Reply With Quote #7

Is there anyone who can help?
__________________
yunuss85 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 14:50.


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