Well, probs the most noobiest coder on here, <and the bitchiest>
can anyone tell me what I did wrong in this
Code:
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_plugin("Glow by Health", "1.0", "Davidos")
register_event("Damage","damage","be")
}
public damage(id)
{
if(id && is_user_alive(id))
{
new health = get_user_health(id)
if (health>=100)
{
set_user_rendering(id, kRenderFxGlowShell,0,0,255,kRenderTransAlpha,5)
}
else
{
if (health>=75)
{
set_user_rendering(id, kRenderFxGlowShell,0,255,0,KRenderTransAlpha,5)
}
else
{
if (health>=50)
{
set_user_rendering(id, kRenderFxGlowShell,255,255,0,KRenderTransAlpha,5)
}
else
{
if (health>=25)
{
set_user_rendering(id, kRenderFxGlowShell,255,100,0,KRenderTransAlpha,5)
}
else
{
if (health>=1)
{
set_user_rendering(id, kRenderFxGlowShell,255,0,0,KRenderTransAlpha,5)
}
else
{
if (health<1)
{
set_user_rendering(id, kRenderFxGlowShell,0,0,0,KRenderTransAlpha,5
}
}
I know it's lame. I'm trying to make it so a player glows and the color changes when one gets under a certain % of health...
<BTW I rebuilt this from Kensai's glow by health mod! Don't flame me for the name O_o>
EDIT:
BAAP BAAAP BRAAP LAME CODING BRAAP!
I didn't realise k and K were SO much diffrent... try this
Code:
#include <amxmodx>
#include <fun>
public plugin_init()
{
register_plugin("Glow by Health", "1.0", "Davidos")
register_event("Damage","damage","be")
}
public damage(id)
{
if(id && is_user_alive(id))
{
new health = get_user_health(id)
if (health>=100)
{
set_user_rendering(id, kRenderFxGlowShell,0,0,255,kRenderTransAlpha,5)
}
else
{
if (health>=75)
{
set_user_rendering(id, kRenderFxGlowShell,0,255,0,kRenderTransAlpha,5)
}
else
{
if (health>=50)
{
set_user_rendering(id, kRenderFxGlowShell,255,255,0,kRenderTransAlpha,5)
}
else
{
if (health>=25)
{
set_user_rendering(id, kRenderFxGlowShell,255,100,0,kRenderTransAlpha,5)
}
else
{
if (health>=1)
{
set_user_rendering(id, kRenderFxGlowShell,255,0,0,kRenderTransAlpha,5)
}
else
{
if (health<1)
{
set_user_rendering(id, kRenderFxGlowShell,0,0,0,kRenderTransAlpha,5)
}
}
}
}
}
}
}
}
something is wrong with this...