[Ranking] Pozostawienie jedynie nicku grac...
tejo
04.11.2012
proszę o przerobienie tego ranku tak aby wyświetlał tylko nick gracza i jego ranking.Daje tu sma. pluginu
#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)
}
Użytkownik benio101 edytował ten post 06.11.2012 00:24
Dodanie znacznika SMA
Domiss
04.11.2012
#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", name, ranking) set_task(1.0, "ShowRank", id) }
tejo
04.11.2012
Dzięki-mam jeszcze jedno pytanie-co zrobić by zmienić kolor tekstu wyświetlanego w hud.Mój domyślny kolor to czerwony.
speedkill
04.11.2012
Kolor zmieniasz w cvarach:
Kolor podajesz w rbg: http://monsterblog.b...55-255-255.html
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") gg_hud_color_red gg_hud_color_green gg_hud_color_blue
Kolor podajesz w rbg: http://monsterblog.b...55-255-255.html
tejo
04.11.2012
I jeszcze jedno pytanie-gdzie zmienić połozenie napisu wyświtlanego w hud?
speedkill
05.11.2012
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)
tejo
05.11.2012
Niestety zmieniłem w tej linijce pozycje na swoją-sma skomplikowalem na amxx i niedziala. proszę o dokladne objasnienie...
Użytkownik tejo edytował ten post 05.11.2012 15:16
Użytkownik tejo edytował ten post 05.11.2012 15:16
tejo
05.11.2012
const Float:HUD_STATS_X = 0.01 // Hud Mode Possition X (default 0.01) const Float:HUD_STATS_Y = 0.64 // Hud Mode Possition Y (default 0.64)
Użytkownik benio101 edytował ten post 06.11.2012 00:25
Dodanie znacznika CODE