Question
#4

Quote:
Originally Posted by Zorono
Посмотреть сообщение
Yes but how can i detect and save his old health before give damage on a string and if player lost more than 50% of his old health will recive an message (for example) please
use GetPlayerHealth function (link) to store players health (global var default can be added on onplayerspawn).
Use this function again when player take damage (link)
Now on this call back use another var to store the current health and check it with the global var we used before.
PHP код:
if(second_var==first_var/2)//for 50% 
update the first var in the if condition and Show the message you want to show (link1,link2).
Reply


Messages In This Thread
Question - by Zorono - 01.08.2016, 11:00
Re: Question - by FreAkeD - 01.08.2016, 11:01
Re: Question - by Zorono - 01.08.2016, 11:09
Re: Question - by SyS - 01.08.2016, 13:33
Re: Question - by Zorono - 01.08.2016, 16:36

Forum Jump:


Users browsing this thread: 1 Guest(s)