Raised This Month: $ Target: $400
 0% 

[SOLVED] ZP surv/neme healt.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Garrey
Member
Join Date: Jan 2010
Old 10-10-2010 , 09:03   [SOLVED] ZP surv/neme healt.
Reply With Quote #1

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

#define PLUGIN_NAME "[ZP] Show HP"
#define PLUGIN_VERS "2.0"
#define PLUGIN_AUTH "ASSOM\HLDS"

#define TASK_HEALTH 1234554321

new name[32]

public 
plugin_init()
{
   
register_plugin(PLUGIN_NAMEPLUGIN_VERSPLUGIN_AUTH)
   
register_dictionary("zombie_plague.txt")

   
// Fwd's
   
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1)
   
RegisterHam(Ham_Killed"player""Fwd_PlayerKilled_Pre"0)
   
register_event("HLTV""event_round_start""a""1=0""2=0")
}

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 
event_round_start(modeid)
//public zp_round_started(mode, id)
{
   if (
zp_has_round_started())
   {

      if (
mode == MODE_NEMESIS)
      {
      
set_task(1.0"Health_Nemisis"id+TASK_HEALTH__"b")
      return
      }

      if (
mode == MODE_SURVIVOR)
      {
      
set_task(1.0"Health_Survivor"id+TASK_HEALTH__"b")
      return
      }

   }
}

public 
Health_Nemisis(id)
{
   
id -= TASK_HEALTH
   
   
if (zp_get_user_nemesis(id))
      
      
remove_task(id+TASK_HEALTH)
      
get_user_name(id,name,31)
      
set_hudmessage(250000.050.4501.01.00.10.2, -1)
      
show_hudmessage(0"%s - %L: %d %L"nameLANG_PLAYER"CLASS_NEMESIS"get_user_health(id), LANG_PLAYER"ZOMBIE_ATTRIB1")
}

public 
Health_Survivor(id)
{
   
id -= TASK_HEALTH
   
   
if (zp_get_user_survivor(id))
   
    
remove_task(id+TASK_HEALTH)
    
get_user_name(id,name,31)
    
set_hudmessage(002500.050.4501.01.00.10.2, -1)
    
show_hudmessage(0"%s - %L: %d %L"nameLANG_PLAYER"CLASS_SURVIVOR"get_user_health(id), LANG_PLAYER"ZOMBIE_ATTRIB1")




public 
zp_round_ended()
{
   
remove_task(TASK_HEALTH)
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
I found this, but it wont compile
On line 77, 79 is loose identitation.

Could someone help to fix it?
Attached Files
File Type: sma Get Plugin or Get Source (shownemesurvHP.sma - 563 views - 2.4 KB)
__________________
People are like music, some speak the truth and others are just noise..

Last edited by Garrey; 10-10-2010 at 10:11. Reason: SOLVED! :)
Garrey is offline
 


Thread Tools
Display Modes

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 10:24.


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