How to make bleeding system timer
#1

Hey guys, i want to know, how to reduce player health every 5 seconds, not immediately. Because this is really annoying. I set -1 health in "OnPlayerUpdate" and it decreased 1 health every half-second.
Here is the code
Код:
public OnPlayerUpdate(playerid)
{
/* 
Many things that i'll not show in this code
*/
new status[64], Float:health, Float:armor, string[128];
	GetPlayerHealth(playerid, health);
	GetPlayerArmour(playerid, armor);
	if(GetPVarInt(playerid, "Injured") != 1)
	{
	 if(PlayerInfo[playerid][pTS] > 1 && health > 5)
	 {
	 SetPlayerHealth(playerid, health-1);
  }
 }
	if(GetPVarInt(playerid, "Injured") != 1)
	{
	 if(PlayerInfo[playerid][pHS] > 1 && health > 5)
	 {
  SetPlayerHealth(playerid, health-1);
  }
 }
/*
MANY MORE THINGS
*/
return 1;
}
Please re-make the script 4 me and a timer for decreasing 1 health every 5 seconds
Reply


Messages In This Thread
How to make bleeding system timer - by Dirda - 05.04.2018, 09:05
Re: How to make bleeding system timer - by m4karow - 05.04.2018, 09:09
Re: How to make bleeding system timer - by Dirda - 05.04.2018, 09:41
Re: How to make bleeding system timer - by jasperschellekens - 05.04.2018, 09:44
Re: How to make bleeding system timer - by Dirda - 05.04.2018, 09:49
Re: How to make bleeding system timer - by Logic_ - 05.04.2018, 09:54
Re: How to make bleeding system timer - by Dirda - 05.04.2018, 10:15
Re: How to make bleeding system timer - by MarianImmortalGod - 05.04.2018, 10:38

Forum Jump:


Users browsing this thread: 3 Guest(s)