Posts: 95
Threads: 25
Joined: Feb 2017
Reputation:
0
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?
Posts: 1,192
Threads: 10
Joined: Dec 2017
Reputation:
0
OnPlayerWeaponShot and OnPlayerTakeDamage and OnPlayerGiveDamage, you can block damage on all these callbacks and give the HP back to avoid the player getting killed.
Posts: 579
Threads: 5
Joined: Oct 2015
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:
- Set the player health to Float:0x7F800000
- 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.
Posts: 1,071
Threads: 24
Joined: Aug 2014
Reputation:
0
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.