[HELP] Health.
#1

Hello guys. I was woundering if there's any way to make the hp not wasting.
If i make the hp filling back after being shot, he'll die first if he is low hp.
Is there any way to make the hp frozen?
Reply
#2

OnPlayerWeaponShot and OnPlayerTakeDamage and OnPlayerGiveDamage, you can block damage on all these callbacks and give the HP back to avoid the player getting killed.
Reply
#3

Quote:
Originally Posted by Davidmkd123
Посмотреть сообщение
Hello guys. I was woundering if there's any way to make the hp not wasting.
If i make the hp filling back after being shot, he'll die first if he is low hp.
Is there any way to make the hp frozen?
You can either:
  1. Set the player health to Float:0x7F800000
  2. Set the same team for the players you don't want to damage each other
You can provide more details on what you'd like to accomplish which would be helpful to determine what you should do.
Reply
#4

Return 0 on OnPlayerTakeDamage or OnPlayerGiveDamage. It will stop doing anything.
You can also do SetPlayerHealth(playerid, 100) under those call backs and return true.
Reply
#5

Quote:
Originally Posted by iKarim
Посмотреть сообщение
You can either:
  1. Set the player health to Float:0x7F800000
  2. Set the same team for the players you don't want to damage each other
You can provide more details on what you'd like to accomplish which would be helpful to determine what you should do.
Yes, the float, thats the thing i was asking for. I made the threat just someone to tell me what codes was it. +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)