12.03.2019, 21:16
Good night, I'm in need of a little help.
The system is the following when a player is hit with a shot, he start to lose life
the problem is that he lose life very fast.
I need have he lose life every 15 seconds.
I will be very grateful if anyone can help!
CODE
The system is the following when a player is hit with a shot, he start to lose life
the problem is that he lose life very fast.
I need have he lose life every 15 seconds.
I will be very grateful if anyone can help!
CODE
PHP код:
if(PlayerInfo[i][pTakesashot] > 0)
{
if(OtherInfos[i][oLoselife] < 5) OtherInfos[i][oLoselife]++;
else
{
OtherInfos[i][oLoselife] = 0;
SendClientMessage(i, COLOR_LIGHTRED, "You are losing your life due to an untreated bullet or stab wound.");
new Float:Lose;
if(PlayerInfo[i][pHeavyShot] > 0) Lose= 8.0;
else Lose= 5.0;
new Float:health;
GetPlayerHealth(i,health);
SetPlayerHealth(i, health-Lose);
HealthPlayerid[i] = health-Lose;
}
}