Help with infinite breath - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with infinite breath (
/showthread.php?tid=590826)
Help with infinite breath -
lollypap54 - 04.10.2015
So, i want to do that : If player wearing oxygen tank, his hp not moving from water. But other death causes can kill him. This is what i tried :
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(weaponid == 53)
{
if(OxygenTank[playerid] == 1)
{
GetPlayerHealth(playerid, HP);
SetPlayerHealth(playerid, HP);
}
}
return 1;
}
HP is lowering slower with this code, but it's still moving.