Raised This Month: $ Target: $400
 0% 

a little help with a hud msg problem...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
diamond-optic
Veteran Member
Join Date: May 2005
Old 04-18-2006 , 22:51   a little help with a hud msg problem...
Reply With Quote #1

ok so heres a plugin that shows the players HP in a hud msg in the upper left corner... the HP hud msg seems to work fine (well except the cvar part is messed up i guess, becuase setting it to 0 makes no difference lol)

my problem is.. that rarely (and i mean like 1 time in 15minutes or so) does any of the stats hud msgs show.. like bullet dmg, end round stats, killer/victim info, etc...

im guessing it has to be cuase of the way im doing the hud msg in this plugin becuase I just added to my server tonight and thats when it started happening...

I also tried it before & after the stats plugin in the plugin.ini but that made no difference...

so heres the code:

Code:
#include <amxmodx> #define MAXPLAYERS 17 new p_amx_showhealth, g_health_sync public plugin_init() {     register_plugin("Show Health","1.0","diamond-optic")         p_amx_showhealth = register_cvar("amx_showhealth", "1")     g_health_sync = CreateHudSyncObj()     } public client_putinserver(id) {     if ((!get_pcvar_num(p_amx_showhealth)) || (!is_user_connected(id)) || (is_user_bot(id)))    //dont bother if not using         return PLUGIN_HANDLED             set_task(1.0,"show_health",1,"",0,"b")      //set the task     return PLUGIN_CONTINUE } public show_health() {     set_hudmessage(255, 255, 255, 0.01, 0.08, 0, 0.0, 2.0, 0.0, 0.0)         for(new i=1;i <= MAXPLAYERS;i++)     if((is_user_alive(i)) && (is_user_connected(i)))     {         ShowSyncHudMsg(i,g_health_sync,"%d HP",get_user_health(i))     } }

any help would be AWESOME lol
__________________
diamond-optic is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode