Hey guys....
I need help with this code...
PHP Code:
/* !! Viziteaza www.tutyzone.ucoz.com !!
-> Intra pe serveru nostru -> tutyzone2.idle.ro <- = Biohazard Zombie Infection si multe alte noutati
copyright (c)
*/
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#define PLUGIN "battery_low"
#define VERSION "1.0"
#define AUTHOR "tuty"
new HB
new healthBat
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
HB = register_cvar("amx_healthbattery", "1")
register_event("ResetHUD","event_spawm","be")
}
public event_spawm(id)
{
set_hudmessage(255, 255, 255, -1.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "[========]")
}
public client_PreThink(id)
{
healthBat = get_user_health(id)
if(get_cvar_num(HB) != 1 && !is_user_alive(id)){
return PLUGIN_HANDLED
set_hudmessage(0, 0, 255, 0.0, -1.0, 0, 6.0, 12.0)
if(healthBat > 100 && healthBat < 100)
{
set_hudmessage(255, 255, 255, 0.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "[========]FULL")
if(healthBat > 90 && healthBat < 100)(show_hudmessage(id, "[========]"))
if(healthBat > 80 && healthBat < 90)(show_hudmessage(id, "[=======]"))
if(healthBat > 70 && healthBat < 80)(show_hudmessage(id, "[======]"))
if(healthBat > 60 && healthBat < 70)(show_hudmessage(id, "[=====]"))
if(healthBat > 50 && healthBat < 60)(show_hudmessage(id, "[====]"))
if(healthBat > 40 && healthBat < 50)(show_hudmessage(id, "[===]"))
if(healthBat > 20 && healthBat < 40)(show_hudmessage(id, "[==]"))
if(healthBat > 0 && healthBat < 20){
set_hudmessage(255, 0, 0, 0.0, -1.0, 0, 6.0, 12.0)
show_hudmessage(id, "!!!!! [=] !!!! ^nBatteryLow")
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,20)
}
}
please.... i hope i will don't come again on this scripting help forum

__________________