How can use armor as health?
I only can do this:
Code:
register_event("Damage", "event_damagechaneg", "be") |
Re: How can use armor as health?
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 |
Re: How can use armor as health?
Thanks.
But I mean that when you attack me, my armor will reduce as health if armor more than damage. Example: My HP100, AP50. You attack me 30 of damage. Then I have HP100, AP20. If My HP20, AP50. You attack me 60 of damage. Then I have HP10, AP0. AP is armor. HP is health. My English doesn't very well. Do you know what I was say? |
Re: How can use armor as health?
Anybody can help me?
|
Re: How can use armor as health?
use hamdamage prehook get armor there, the use post hook and see armor taken, replenish it, reduce armor by damage number and supercode damage
|
| All times are GMT -4. The time now is 18:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.