[ZP] How to add health, class, AP etc under the radar
Feb 7, 2015 7:24:18 GMT
lindi and Nice like this
Post by zmd94 on Feb 7, 2015 7:24:18 GMT
A. ZP 4.3:
1. Please open cstrike\addons\amxmodx\scripting\zombie_plague40.sma
2. Then find this:
const Float:HUD_STATS_X = 0.02
const Float:HUD_STATS_Y = 0.9
3. Just change the value:
const Float:HUD_STATS_X = 0.01
const Float:HUD_STATS_Y = 0.28
4. After that, just change this:
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L: %d - %L %s - %L %d", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD,
-->
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "[%L: %d] ^n[%L %s] ^n[%L %d]", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD,
5. Lastly, just compile it and put zombie_plague40.amxx in cstrike\addons\amxmodx\plugins.
B. ZPA 1.6.1:
1. Please open cstrike\addons\amxmodx\scripting\zombie_plague_advance_v1-6-1.sma
2. Then find this:
const Float:HUD_STATS_X = 0.02
const Float:HUD_STATS_Y = 0.9
3. Just change the value:
const Float:HUD_STATS_X = 0.01
const Float:HUD_STATS_Y = 0.28
4. After that, find this:
// Spectating someone else?
if (id != ID_SHOWHUD)
{
// Show name, health, class, and ammo packs and armor
set_hudmessage(255, 10, 255, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L %s^nHP: %d - %L %s - %L %d - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id],
pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id], ID_SHOWHUD, "ARMOR", pev(id, pev_armorvalue))
}
else
{
// Show health, class and ammo packs and armor
set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L: %d - %L %s - %L %d - %L %d", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS",
class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD], ID_SHOWHUD, "ARMOR", pev(ID_SHOWHUD, pev_armorvalue))
}
}
5. Just change it with this:
// Spectating someone else?
if (id != ID_SHOWHUD)
{
// Show name, health, class, and ammo packs and armor
set_hudmessage(255, 10, 255, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "%L %s^nHP: %d - %L %s - %L %d - %L %d", ID_SHOWHUD, "SPECTATING", g_playername[id],
pev(id, pev_health), ID_SHOWHUD, "CLASS_CLASS", class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[id], ID_SHOWHUD, "ARMOR", pev(id, pev_armorvalue))
}
else
{
// Show health, class and ammo packs and armor
set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync2, "[%L: %d] ^n[%L %s] ^n[%L %d]", id, "ZOMBIE_ATTRIB1", pev(ID_SHOWHUD, pev_health), ID_SHOWHUD, "CLASS_CLASS",
class, ID_SHOWHUD, "AMMO_PACKS1", g_ammopacks[ID_SHOWHUD], ID_SHOWHUD, "ARMOR", pev(ID_SHOWHUD, pev_armorvalue))
}
}
6. Lastly, just compile it and put zombie_plague_advance_v1-6-1.amxx in cstrike\addons\amxmodx\plugins.
C. ZP 5.0:
1. Please open cstrike\addons\amxmodx\scripting\zp50\zp50_hud_info.sma
2. Then find this:
const Float:HUD_STATS_X = 0.02
const Float:HUD_STATS_Y = 0.9
3. Just change the value:
const Float:HUD_STATS_X = 0.01
const Float:HUD_STATS_Y = 0.28
4. After that, find this:
// 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^nHP: %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^nHP: %d - %L %s - %L $ %d", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "MONEY1", cs_get_user_money(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, "HP: %d - %L %s - %L %d", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(ID_SHOWHUD))
else
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "HP: %d - %L %s", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name)
}
}
5. Just change it with this:
// 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^nHP: %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^nHP: %d - %L %s - %L $ %d", ID_SHOWHUD, "SPECTATING", player_name, get_user_health(player), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "MONEY1", cs_get_user_money(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, "[Health: %d]^n[%L %s]^n[%L %d]", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(ID_SHOWHUD))
else
ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "[Health: %d]^n[%L %s]", get_user_health(ID_SHOWHUD), ID_SHOWHUD, "CLASS_CLASS", class_name)
}
}
6. Lastly, just compile it and put zp50_hud_info.amxx in cstrike\addons\amxmodx\plugins
I hope this tutorial will be useful.