GunGame Ranking [Updated v4.0]
Plugin ten pokazuje Ranking w Lewym górnym rogu (nowy wygląd)
Instalacja:
Plik gg_hud_stats.amxx wrzucamy do cstrike/addons/amxmod/plugins
cstrike/addons/amxmod/configs/plugins.ini dopisujemy na samym koncu gg_hud_stats.amxx
Cvars:
gg_hud_color_red 50 / / Kolor czerwony w Hud
gg_hud_color_green 135 / / kolor zielony w Hud
gg_hud_color_blue 180 / / Kolor niebieski w Hud
Plugin:
#include <amxmodx>
#include <csstats>
#define PLUG "GunGame Hud Rank Stats"
#define VERS "4.0"
#define AUTH "eXacT"
new gMsgHudSync
new cvar_hudcolor_red
new cvar_hudcolor_green
new cvar_hudcolor_blue
const Float:HUD_STATS_X = 0.00 // Hud Mode Possition X (default 0.00)
const Float:HUD_STATS_Y = 0.0 // Hud Mode Possition Y (default 0.0)
public plugin_init()
{
register_plugin(PLUG, VERS, AUTH)
gMsgHudSync = CreateHudSyncObj()
cvar_hudcolor_red = register_cvar("gg_hud_color_red", "50")
cvar_hudcolor_green = register_cvar("gg_hud_color_green", "135")
cvar_hudcolor_blue = register_cvar("gg_hud_color_blue", "180")
}
public client_connect(id)
{
client_cmd(id, "hideradar")
}
public client_putinserver(id)
{
set_task(5.0,"ShowRank",id)
}
public client_disconnect(id)
{
if(task_exists(id))
remove_task(id)
}
public ShowRank(id)
{
static red, green, blue
static stats[8], body[8]
new ranking = get_user_stats(id, stats, body)
new name[33]
get_user_name(id, name, 32)
red = get_pcvar_num(cvar_hudcolor_red)
green = get_pcvar_num(cvar_hudcolor_green)
blue = get_pcvar_num(cvar_hudcolor_blue)
set_hudmessage(red, green, blue, HUD_STATS_Y, HUD_STATS_X, 1, 1.0, 255.0, 0.0, 0.0, 3)
ShowSyncHudMsg(id, gMsgHudSync, "Name: %s^nRank: %d^nKills: %d^nDeaths: %d^nHeadShots: %d", name, ranking, stats[0], stats[1], stats[2])
set_task(1.0, "ShowRank", id)
}źródło:AlliedMod


Dodatki SourceMod








gg_hud_stats.amxx






