Raised This Month: $ Target: $400
 0% 

How can use armor as health?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 07-31-2009 , 10:01   Re: How can use armor as health?
Reply With Quote #2

why u dont get user armor & set_user_health(id, user_armor)? or u mean anything else?

public event_damagechaneg(id)
{
new user_armor = get_user_armor(id)
new g_damage = read_data(2)
new user_health = get_user_health(id)
new new_arm = user_armor + g_damage
if(user_armor - g_damage >= 0)
{
cs_set_user_armor(id,new_arm,CS_ARMOR_VESTHEL M)
}
else if ((user_armor - g_damage <= 0 )&& (user_armor + user_health - g_damage >= 0))
{
cs_set_user_armor(id,0,CS_ARMOR_VESTHELM)
set_user_health(id,new_arm - g_damage)
}
}

test this one. idk if this is realy that what u want. hope could help
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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 18:20.


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