|
Senior Member
Join Date: Feb 2016
Location: Pluto
|

02-16-2022
, 19:35
Re: How can i make ocixcrom level plugin to show 5,000/10,000Xp in hud?
|
#7
|
Quote:
Originally Posted by Supremache
This function should work in any plugin with any code but make sure you are Use it correctly.
PHP Code:
if (id != ID_SHOWHUD)
{
// Show name, health, class, and ammo packs and armor
set_dhudmessage(0, 0, 138, HUD_SPECT_X, HUD_SPECT_Y, 1, 6.0, 1.1, 0.0, 0.0)
show_dhudmessage(ID_SHOWHUD, "%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
{
new szXPCommas[ 16 ], szNextXPCommas[ 16 ], szAPCommas[ 16 ];
AddCommas( mysystem_get_user_xp( id ), szXPCommas, charsmax( szXPCommas ) );
AddCommas( mysystem_get_user_next_xp(id), szNextXPCommas, charsmax( szNextXPCommas ) );
AddCommas( g_ammopacks[id], szAPCommas, charsmax( szAPCommas ) );
set_dhudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0)
show_dhudmessage(ID_SHOWHUD, "%L: %d - %L %s - %L %d - %L %d^nXP: %s/%s | Level: %d/%d: %s", 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), szXPCommas, szNextXPCommas, mysystem_get_user_level(id), mysystem_get_max_levels(), rankname, szAPCommas )
}
|
So, firstly, i have to add Bugsy's AddCommas code at the bottom of the main ZPA source code, and then use the code you gave me. Did i understand you correctly?
|
|