Problem info hud
reload93
21.02.2016
Witam posiadam na serwerze hud którego kod zamieszczam poniżej i mam z nim problem ponieważ po zmianie mapy zabójstwa w nim wyświetlane resetuję się, a chciałbym aby były zliczane cały czas. Pomóżcie proszę Dodam, że jest to lekka przeróbka tego pluginu - http://amxx.pl/topic/107967-info-hud/
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <hamsandwich> #include <csx> #define TASK_FUN 672 #define PLUGIN "Info_hud" #define VERSION "1.0" #define AUTHOR "Flk" new sync_hud_obj; new kill[33]; new cvar_hud; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1); sync_hud_obj = CreateHudSyncObj(); register_event("DeathMsg", "eDeath", "a"); cvar_hud = register_cvar("hud_wyglad", "1"); } public client_connect(id) { kill[id]= 0; } public client_disconnect(id) { kill[id]= 0; } public Odrodzenie(id) { if(!task_exists(id+TASK_FUN)) set_task(0.1, "Hud_fun", id+TASK_FUN, _, _, "b"); } public eDeath() { new attacker=read_data(1); kill[attacker]++; return PLUGIN_CONTINUE; } public Hud_fun(id) { id -= TASK_FUN; static stats[8], body[8]; get_user_stats(id, stats, body); if(!is_user_connected(id)) { remove_task(id+TASK_FUN); return PLUGIN_CONTINUE; } if(!is_user_alive(id)) { new target = pev(id, pev_iuser2); new name[32] get_user_name(target, name, 31) if(!target) return PLUGIN_CONTINUE; new hud_wyglad = get_pcvar_num(cvar_hud); switch(hud_wyglad) { case 1: { set_hudmessage(0, 160, 0, 0.03, 0.2, 0, 6.0, 1.0) ShowSyncHudMsg(id, sync_hud_obj, "[Nick: %s]^n[HP: %d]^n[VIP: %s]^n[Zabójstwa: %d]^n[Forum: xx]", name, get_user_health(id), get_user_flags(id) & ADMIN_LEVEL_H ? "Tak" : "Nie", kill[target]); } } return PLUGIN_CONTINUE; } new name[32] get_user_name(id, name, 31) new hud_wyglad = get_pcvar_num(cvar_hud); switch(hud_wyglad) { case 1: { set_hudmessage(0, 160, 0, 0.03, 0.2, 0, 6.0, 1.0) ShowSyncHudMsg(id, sync_hud_obj, "[Nick: %s]^n[HP: %d]^n[VIP: %s]^n[Zabójstwa: %d]^n[Forum: xx]", name, get_user_health(id), get_user_flags(id) & ADMIN_LEVEL_H ? "Tak" : "Nie", kill[id]); } } return PLUGIN_CONTINUE; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1045\\ f0\\ fs16 \n\\ par } */
Użytkownik reload93 edytował ten post 21.02.2016 11:59