Raised This Month: $ Target: $400
 0% 

armor drain


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 12:25   Re: armor drain
Reply With Quote #2

This works perfectly for me:

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> public plugin_init()     register_event("Damage","armor_drain","be") public armor_drain(id) {     if(!is_user_alive(id) || !is_user_connected(id))         return PLUGIN_CONTINUE         new CsArmorType:catArmor,iArmor = cs_get_user_armor(id,catArmor),iHealth = get_user_health(id)     if(iArmor < 10)         return PLUGIN_CONTINUE             new iDamage = read_data(2)     new iValue = iArmor - (iDamage / 2)     if(iValue < 0)         iDamage += iValue             set_user_armor(id,clamp(iValue,0,255))     set_user_health(id,iHealth + iDamage)         return PLUGIN_CONTINUE }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 07:56.


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