HUD для ZP 5.0.8 (LVL SYSTEM)

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
418
Реакции
-7
Предупреждения
8
Ошибка
Ошибок нет, но добавил в худ лвл и опыт, сам опыт 76\0 и не знаю как исправить..
ОС
Windows
Amx Mod X
AMX Mod X 1.9.0.5294 (http://www.amxmodx.org)
Билд
Protocol version 48
Exe version 1.1.2.6/2.0.0.0 (cstrike)
Exe build: 16:05:41 Jun 15 2009 (45
ReGamedll
Local Server with Bots
Версия Metamod
Metamod v1.20  2013-02-16 (5:13)
Список метамодулей
[ 1] AMX Mod X        RUN   -    amxmodx_mm.dll    v1.9.0.5  ini  Start ANY  
[ 2] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl1 ANY ANY
[ 3] FakeMeta RUN - fakemeta_amxx.dl v1.9.0.5 pl1 ANY ANY
[ 4] CStrike RUN - cstrike_amxx.dll v1.9.0.5 pl1 ANY ANY
[ 5] Fun RUN - fun_amxx.dll v1.9.0.5 pl1 ANY ANY
5 plugins, 5 running
Список плагинов
name                    version     author            file             status   
[ 1] Admin Base 1.9.0.5294 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5294 AMXX Dev Team admincmd.amxx running
[ 3] Admin Help 1.9.0.5294 AMXX Dev Team adminhelp.amxx running
[ 4] Slots Reservation 1.9.0.5294 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5294 AMXX Dev Team multilingual.am running
[ 6] Menus Front-End 1.9.0.5294 AMXX Dev Team menufront.amxx running
[ 7] Commands Menu 1.9.0.5294 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5294 AMXX Dev Team plmenu.amxx running
[ 9] Maps Menu 1.9.0.5294 AMXX Dev Team mapsmenu.amxx running
[ 10] Plugin Menu 1.9.0.5294 AMXX Dev Team pluginmenu.amxx running
[ 11] Admin Chat 1.9.0.5294 AMXX Dev Team adminchat.amxx running
[ 12] Anti Flood 1.9.0.5294 AMXX Dev Team antiflood.amxx running
[ 13] Scrolling Message 1.9.0.5294 AMXX Dev Team scrollmsg.amxx running
[ 14] Info. Messages 1.9.0.5294 AMXX Dev Team imessage.amxx running
[ 15] Admin Votes 1.9.0.5294 AMXX Dev Team adminvote.amxx running
[ 16] NextMap 1.9.0.5294 AMXX Dev Team nextmap.amxx running
[ 17] Nextmap Chooser 1.9.0.5294 AMXX Dev Team mapchooser.amxx running
[ 18] TimeLeft 1.9.0.5294 AMXX Dev Team timeleft.amxx running
[ 19] Pause Plugins 1.9.0.5294 AMXX Dev Team pausecfg.amxx running
[ 20] Stats Configuration 1.9.0.5294 AMXX Dev Team statscfg.amxx running
[ 21] [ZP]Level System 6.1 Dambas zp_level_system running
[ 22] [ZP] Admin Lvl Menu 1.0 Dambas zp_level_admin_ running
[ 23] [ZP] Core/Engine 5.0.8 ZP Dev Team zp50_core.amxx running
[ 24] [AMXX] External Settin 0.1 WiLS amx_settings_ap running
[ 25] [CS] Player Models API 1.2 WiLS cs_player_model running
[ 26] [CS] Teams API 1.2 WiLS cs_teams_api.am running
[ 27] [CS] MaxSpeed API 1.0 WiLS cs_maxspeed_api running
[ 28] [CS] Weapon Models API 1.1 WiLS cs_weap_models_ running
[ 29] [CS] Weapons Restrict 0.4 WiLS cs_weap_restric running
[ 30] [CS] Ham Hooks for Bot 1.0 WiLS cs_ham_bots_api running
[ 31] [ZP] Class: Zombie 5.0.8 ZP Dev Team zp50_class_zomb running
[ 32] [ZP] Class: Human 5.0.8 ZP Dev Team zp50_class_huma running
[ 33] [ZP] Class: Nemesis 5.0.8 ZP Dev Team zp50_class_neme running
[ 34] [ZP] Class: Survivor 5.0.8 ZP Dev Team zp50_class_surv running
[ 35] [ZP] Class: Zombie: Cl 5.0.8 ZP Dev Team zp50_class_zomb running
[ 36] [ZP] Class: Zombie: Ra 5.0.8 ZP Dev Team zp50_class_zomb running
[ 37] [ZP] Class: Zombie: Li 5.0.8 ZP Dev Team zp50_class_zomb running
[ 38] [ZP] Class: Zombie: Fa 5.0.8 ZP Dev Team zp50_class_zomb running
[ 39] [ZP] Class: Zombie: Le 5.0.8 ZP Dev Team zp50_class_zomb running
[ 40] [ZP] Class: Zombie: Ra 5.0.8 ZP Dev Team zp50_class_zomb running
[ 41] [ZP] Class: Human: Cla 5.0.8 ZP Dev Team zp50_class_huma running
[ 42] [ZP] Human Armor 5.0.8 ZP Dev Team zp50_human_armo running
[ 43] [ZP] Game Modes Manage 5.0.8 ZP Dev Team zp50_gamemodes. running
[ 44] [ZP] Game Mode: Infect 5.0.8 ZP Dev Team zp50_gamemode_i paused
[ 45] [ZP] Game Mode: Multip 5.0.8 ZP Dev Team zp50_gamemode_m paused
[ 46] [ZP] Game Mode: Swarm 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 47] [ZP] Game Mode: Nemesi 5.0.8 ZP Dev Team zp50_gamemode_n running
[ 48] [ZP] Game Mode: Surviv 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 49] [ZP] Game Mode: Plague 5.0.8 ZP Dev Team zp50_gamemode_p paused
[ 50] [ZP] Game Mode: Armage 5.0.8 ZP Dev Team zp50_gamemode_a paused
[ 51] [ZP] Items Manager 5.0.8 ZP Dev Team zp50_items.amxx running
[ 52] [ZP] Items Manager: Am 5.0.8 ZP Dev Team zp50_items_ammo running
[ 53] [ZP] Item: Weapons 5.0.8 ZP Dev Team zp50_item_weapo running
[ 54] [ZP] Item: Nightvision 5.0.8 ZP Dev Team zp50_item_night running
[ 55] [ZP] Item: Antidote 5.0.8 ZP Dev Team zp50_item_antid running
[ 56] [ZP] Item: Zombie Madn 5.0.8 ZP Dev Team zp50_item_zombi running
[ 57] [ZP] Item: Infection B 5.0.8 ZP Dev Team zp50_item_infec running
[ 58] [ZP] Admin Commands 5.0.8 ZP Dev Team zp50_admin_comm running
[ 59] [ZP] Admin Menus 5.0.8 ZP Dev Team zp50_admin_menu running
[ 60] [ZP] Admin Models 5.0.8 ZP Dev Team zp50_admin_mode running
[ 61] [ZP] Custom Buy Menus 5.0.8 ZP Dev Team zp50_buy_menus. running
[ 62] [ZP] Buyzones 5.0.8 ZP Dev Team zp50_buy_zones. running
[ 63] [ZP] Rewards: Ammo Pac 5.0.8 ZP Dev Team zp50_rewards_am running
[ 64] [ZP] Rewards: Frags & 5.0.8 ZP Dev Team zp50_rewards_fr running
[ 65] [ZP] Deathmatch 5.0.8 ZP Dev Team zp50_deathmatch running
[ 66] [ZP] Random Spawning 5.0.8 ZP Dev Team zp50_random_spa running
[ 67] [ZP] Spawn Protection 5.0.8 ZP Dev Team zp50_spawn_prot running
[ 68] [ZP] Zombie Features 5.0.8 ZP Dev Team zp50_zombie_fea running
[ 69] [ZP] Zombie Sounds 5.0.8 ZP Dev Team zp50_zombie_sou running
[ 70] [ZP] Zombie Damage 5.0.8 ZP Dev Team zp50_zombie_dam running
[ 71] [ZP] Human Unlimited A 5.0.8 ZP Dev Team zp50_human_ammo running
[ 72] [ZP] Flashlight 5.0.8 ZP Dev Team zp50_flashlight running
[ 73] [ZP] Nightvision 5.0.8 ZP Dev Team zp50_nightvisio running
[ 74] [ZP] Leap/Longjump 5.0.8 ZP Dev Team zp50_leap.amxx running
[ 75] [ZP] Pain Shock Free 5.0.8 ZP Dev Team zp50_painshockf running
[ 76] [ZP] Knockback 5.0.8 ZP Dev Team zp50_knockback. running
[ 77] [ZP] Weapon Drop/Strip 5.0.8 ZP Dev Team zp50_weapon_dro running
[ 78] [ZP] Effects: Infect 5.0.8 ZP Dev Team zp50_effects_in running
[ 79] [ZP] Effects: Cure 5.0.8 ZP Dev Team zp50_effects_cu running
[ 80] [ZP] Effects: Lighting 5.0.8 ZP Dev Team zp50_effects_li running
[ 81] [ZP] Ambience Effects 5.0.8 ZP Dev Team zp50_ambience_e running
[ 82] [ZP] Main Menu 5.0.8 ZP Dev Team zp50_main_menu. running
[ 83] [ZP] Objective Remover 5.0.8 ZP Dev Team zp50_objective_ running
[ 84] [ZP] Gameplay Fixes 5.0.8 ZP Dev Team zp50_gameplay_f running
[ 85] [ZP] Team Scoring 5.0.8 ZP Dev Team zp50_team_scori running
[ 86] [ZP] Server Browser In 5.0.8 ZP Dev Team zp50_serverbrow running
[ 87] [ZP] HUD Information 5.0.8 ZP Dev Team zp50_hud_info.a running
[ 88] [ZP] Ammo Packs 5.0.8 ZP Dev Team zp50_ammopacks. running
[ 89] [ZP] Grenade: Fire 5.0.8 ZP Dev Team zp50_grenade_fi running
[ 90] [ZP] Grenade: Frost 5.0.8 ZP Dev Team zp50_grenade_fr running
[ 91] [ZP] Grenade: Flare 5.0.8 ZP Dev Team zp50_grenade_fl running
[ 92] [ZP] ZP 4.3 Subplugin 5.0.8 ZP Dev Team zp50_zp43_compa running
[ 93] [ZP] Can A
Автор плагина
ZP Dev Team
Версия плагина
5.0.8
Исходный код
/*================================================================================

----------------------------
-*- [ZP] HUD Information -*-
----------------------------

This plugin is part of Zombie Plague Mod and is distributed under the
terms of the GNU General Public License. Check ZP_ReadMe.txt for details.

================================================================================*/

#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <zp50_class_human>
#include <zp50_class_zombie>
#define LIBRARY_NEMESIS "zp50_class_nemesis"
#include <zp50_class_nemesis>
#define LIBRARY_SURVIVOR "zp50_class_survivor"
#include <zp50_class_survivor>
#define LIBRARY_AMMOPACKS "zp50_ammopacks"
#include <zp50_ammopacks>
#include <zp_level_system>

const Float:HUD_SPECT_X = -1.0
const Float:HUD_SPECT_Y = 0.8
const Float:HUD_STATS_X = -1.0
const Float:HUD_STATS_Y = 0.8

const HUD_STATS_ZOMBIE_R = 200
const HUD_STATS_ZOMBIE_G = 250
const HUD_STATS_ZOMBIE_B = 0

const HUD_STATS_HUMAN_R = 0
const HUD_STATS_HUMAN_G = 200
const HUD_STATS_HUMAN_B = 250

const HUD_STATS_SPEC_R = 0
const HUD_STATS_SPEC_G = 255
const HUD_STATS_SPEC_B = 0

#define TASK_SHOWHUD 100
#define ID_SHOWHUD (taskid - TASK_SHOWHUD)

const PEV_SPEC_TARGET = pev_iuser2

new g_MsgSync

public plugin_init()
{
register_plugin("[ZP] HUD Information", ZP_VERSION_STRING, "ZP Dev Team")

g_MsgSync = CreateHudSyncObj()
}

public plugin_natives()
{
set_module_filter("module_filter")
set_native_filter("native_filter")
}
public module_filter(const module[])
{
if (equal(module, LIBRARY_NEMESIS) || equal(module, LIBRARY_SURVIVOR) || equal(module, LIBRARY_AMMOPACKS))
return PLUGIN_HANDLED;

return PLUGIN_CONTINUE;
}
public native_filter(const name[], index, trap)
{
if (!trap)
return PLUGIN_HANDLED;

return PLUGIN_CONTINUE;
}

public client_putinserver(id)
{
if (!is_user_bot(id))
{
// Set the custom HUD display task
set_task(1.0, "ShowHUD", id+TASK_SHOWHUD, _, _, "b")
}
}

public client_disconnect(id)
{
remove_task(id+TASK_SHOWHUD)
}

// Show HUD Task
public ShowHUD(taskid)
{
new player = ID_SHOWHUD

// Player dead?
if (!is_user_alive(player))
{
// Get spectating target
player = pev(player, PEV_SPEC_TARGET)

// Target not alive
if (!is_user_alive(player))
return;
}

// Format classname
static class_name[32], transkey[64]
new red, green, blue

if (zp_core_is_zombie(player)) // zombies
{
red = HUD_STATS_ZOMBIE_R
green = HUD_STATS_ZOMBIE_G
blue = HUD_STATS_ZOMBIE_B

// Nemesis Class loaded?
if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_nemesis_get(player))
formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, "CLASS_NEMESIS")
else
{
zp_class_zombie_get_name(zp_class_zombie_get_current(player), class_name, charsmax(class_name))

// ML support for class name
formatex(transkey, charsmax(transkey), "ZOMBIENAME %s", class_name)
if (GetLangTransKey(transkey) != TransKey_Bad) formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, transkey)
}
}
else // humans
{
red = HUD_STATS_HUMAN_R
green = HUD_STATS_HUMAN_G
blue = HUD_STATS_HUMAN_B

// Survivor Class loaded?
if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_survivor_get(player))
formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, "CLASS_SURVIVOR")
else
{
zp_class_human_get_name(zp_class_human_get_current(player), class_name, charsmax(class_name))

// ML support for class name
formatex(transkey, charsmax(transkey), "HUMANNAME %s", class_name)
if (GetLangTransKey(transkey) != TransKey_Bad) formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, transkey)
}
}

// Spectating someone else?
if (player != ID_SHOWHUD)
{
new player_name[32]
get_user_name(player, player_name, charsmax(player_name))

// Show name, health, class, and money
set_hudmessage(HUD_STATS_SPEC_R, HUD_STATS_SPEC_G, HUD_STATS_SPEC_B, HUD_SPECT_X, HUD_SPECT_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)

if (LibraryExists(LIBRARY_AMMOPACKS, LibType_Library))
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "%L: %s^n[Здоровье: %d] [%L %s] [%L %d]", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(player))
else
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "%L: %s^n[Здоровье: %d] [%L %s] [%L %d]", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "MONEY1", zp_ammopacks_get(player))
}
else
{
// Show health, class
set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)

if (LibraryExists(LIBRARY_AMMOPACKS, LibType_Library))
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "[Здоровье: %d] [%L %s] [%L %d]^n[Уровень: %d] [Опыт: %i/%d]", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(ID_SHOWHUD), ID_SHOWHUD, "LEVEL_LEVEL", zp_level(ID_SHOWHUD), ID_SHOWHUD, "LEVEL_EXP", zp_exp(ID_SHOWHUD), ID_SHOWHUD, "NEXT_LEVEL_EXP", zp_next_level_exp(ID_SHOWHUD))
else
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "[Здоровье: %d] [%L %s]", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name)
}
}
lvl.png
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
418
Реакции
-7
Предупреждения
8
Ап темы (topic up) - поднятие своей темы для привлечения внимания (разрешается 1 раз в 3 дня).
Сообщения
94
Реакции
59
Помог
4 раз(а)
Замените 168 строку на эту:
Код:
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "[Здоровье: %d] [%L %s] [%L %d]^n[Уровень: %d] [Опыт: %i/%d]", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(ID_SHOWHUD), zp_level(ID_SHOWHUD), zp_exp(ID_SHOWHUD), zp_next_level_exp(ID_SHOWHUD))
 
Сообщения
418
Реакции
-7
Предупреждения
8
Можно ли как-то с zBot 1.5 подключить лвл систему?
 
Сообщения
673
Реакции
242
Помог
11 раз(а)
RedGamer, у ботах стим айди фиксируется как "BOT", врятли целесообразно копить им опыт, к тому же словишь out of index для ботов
 
Сообщения
678
Реакции
56
Помог
16 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Limbooc, за исключением если не вести стату для ботов чисто по никам)
 
Сообщения
673
Реакции
242
Помог
11 раз(а)
XyLiGaN, одним кваром не обойтись) переписать код как минимум для живых по стим айди, для ботов по нику
 
Сообщения
418
Реакции
-7
Предупреждения
8
RedGamer, у ботах стим айди фиксируется как "BOT", врятли целесообразно копить им опыт, к тому же словишь out of index для ботов
Блин, а что делать то.. поставил podbot 3.0 все работает но хитбокс головы у ботов пропал, да и сам хитбокс кривой какой-то
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу