|
Senior Member
|

10-10-2010
, 09:33
Re: ZP surv/neme healt.
|
#2
|
Ok ... First of all , Ignore loose indentations , they are nothing , by nothing i mean its not a big deal and wont give you any errors...
I just fixed it for you , So you would be happy -.- :
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_NAME, PLUGIN_VERS, PLUGIN_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(victim, attacker, shouldgib)
{
if (task_exists(victim+TASK_HEALTH))
remove_task(victim+TASK_HEALTH)
}
public event_round_start(mode, id)
//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(250, 0, 0, 0.05, 0.45, 0, 1.0, 1.0, 0.1, 0.2, -1)
show_hudmessage(0, "%s - %L: %d %L", name, LANG_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(0, 0, 250, 0.05, 0.45, 0, 1.0, 1.0, 0.1, 0.2, -1)
show_hudmessage(0, "%s - %L: %d %L", name, LANG_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 }
*/
__________________
o [ ||||||||||] - 100% o [ ||||||||||] - 20%
|
|