Raised This Month: $ Target: $400
 0% 

Health Display.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 08-24-2009 , 05:52   Health Display.
Reply With Quote #1

How to match this plugin:

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>
#include <fakemeta>

#define PLUGIN_NAME "[ZP] Survivor Health"
#define PLUGIN_VERS "1.0"
#define PLUGIN_AUTH "hi!"

#define TASK_HEALTH 1234554321
new g_iHudSync

public plugin_init() 
{
 
register_plugin(PLUGIN_NAMEPLUGIN_VERSPLUGIN_AUTH)
 
 
//
 
g_iHudSync CreateHudSyncObj()
 
 
// Fwd's
 
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1)
 
RegisterHam(Ham_Killed"player""Fwd_PlayerKilled_Pre"0)
        
register_forward(FM_ClientDisconnect"client_disconnect")
}

public 
Fwd_PlayerSpawn_Post(id)
{
 if (
task_exists(id+TASK_HEALTH))
  
remove_task(id+TASK_HEALTH)
}

public 
Fwd_PlayerKilled_Pre(victimattackershouldgib)
{
 if (
task_exists(victim+TASK_HEALTH))
  
remove_task(victim+TASK_HEALTH)
}

public 
client_disconnect(id)
{
 if (
task_exists(id+TASK_HEALTH))
  
remove_task(id+TASK_HEALTH)
}

public 
zp_round_started(modeid)
{
 if (
mode != MODE_SURVIVOR)
  return
  
 if (!
zp_get_user_survivor(id))
  return
  
 
set_task(1.0"Task_ShowHealth"id+TASK_HEALTH__"b")
}

public 
Task_ShowHealth(id)
{
 
id -= TASK_HEALTH
 
 
if (!zp_get_user_survivor(id))
  
remove_task(id+TASK_HEALTH)
 
 
set_hudmessage(00225, -1.00.201.01.00.10.2, -1)
 
ShowSyncHudMsg(0g_iHudSync"Survivor Health: %d"get_user_health(id))

With this :

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>
#include <fakemeta>

#define PLUGIN_NAME "[ZP] Survivor Health"
#define PLUGIN_VERS "1.0"
#define PLUGIN_AUTH "hi!"

#define TASK_HEALTH 1234554321
new g_iHudSync

public plugin_init() 
{
 
register_plugin(PLUGIN_NAMEPLUGIN_VERSPLUGIN_AUTH)
 
 
//
 
g_iHudSync CreateHudSyncObj()
 
 
// Fwd's
 
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1)
 
RegisterHam(Ham_Killed"player""Fwd_PlayerKilled_Pre"0)
        
register_forward(FM_ClientDisconnect"client_disconnect")
}

public 
Fwd_PlayerSpawn_Post(id)
{
 if (
task_exists(id+TASK_HEALTH))
  
remove_task(id+TASK_HEALTH)
}

public 
Fwd_PlayerKilled_Pre(victimattackershouldgib)
{
 if (
task_exists(victim+TASK_HEALTH))
  
remove_task(victim+TASK_HEALTH)
}

public 
client_disconnect(id)
{
 if (
task_exists(id+TASK_HEALTH))
  
remove_task(id+TASK_HEALTH)
}

public 
zp_round_started(modeid)
{
 if (
mode != MODE_NEMESIS)
  return
  
 if (!
zp_get_user_nemesis(id))
  return
  
 
set_task(1.0"Task_ShowHealth"id+TASK_HEALTH__"b")
}

public 
Task_ShowHealth(id)
{
 
id -= TASK_HEALTH
 
 
if (!zp_get_user_nemesis(id))
  
remove_task(id+TASK_HEALTH)
 
 
set_hudmessage(00225, -1.00.201.01.00.10.2, -1)
 
ShowSyncHudMsg(0g_iHudSync"Nemesis Health: %d"get_user_health(id))

Mr.Noobie is offline
 



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 15:06.


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