Raised This Month: $ Target: $400
 0% 

Noob coder (Check inside) [Solved!... sorta]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Davidos
Senior Member
Join Date: Feb 2005
Old 02-16-2007 , 15:06   Noob coder (Check inside) [Solved!... sorta]
Reply With Quote #1

Ok guys, I reposted it in scripting, now help me out with 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>=200)             {             set_user_rendering(id, kRenderFxGlowShell,255,255,255,kRenderTransAlpha,255)         }         else         {             if (health>=100)                 {                 set_user_rendering(id, kRenderFxGlowShell,0,0,255,kRenderTransAlpha,255)             }             else             {                 if (health>=75)                     {                     set_user_rendering(id, kRenderFxGlowShell,0,255,0,kRenderTransAlpha,255)                 }                 else                 {                     if (health>=50)                         {                         set_user_rendering(id, kRenderFxGlowShell,255,255,0,kRenderTransAlpha,255)                     }                     else                     {                         if (health>=25)                             {                             set_user_rendering(id, kRenderFxGlowShell,255,100,0,kRenderTransAlpha,255)                         }                         else                         {                             if (health>=10)                                 {                                 set_user_rendering(id, kRenderFxGlowShell,255,0,0,kRenderTransAlpha,255)                             }                             else                             {                                 if (health>=0)                                     {                                     set_user_rendering(id, kRenderFxGlowShell,3,3,3,kRenderTransAlpha,255)                                                                     }                             }                         }                     }                 }             }         }     } }

problems:

200+ hp doesn't give white
5- hp doesn't give black > Glow


The glow shell is bloody large O_O

So, any ideas why this isn't working as I had hoped it would?


Edit freely!

NOTICE 2

When I use commands like slap or heal the colors don't change either

Secondly when I pick up a medkit/etc. it still doesn't change to green untill I get hit.

Last edited by Davidos; 02-16-2007 at 18:26.
Davidos 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 00:41.


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