Remove fall damage - 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: Remove fall damage (
/showthread.php?tid=615646)
Remove fall damage -
GoldenLion - 25.08.2016
Hi, how is it possible to remove fall damage? Slice removed it in weapon-config.inc, but how?
Re: Remove fall damage -
Gammix - 25.08.2016
Using SKY plugin:
- Server sided health
- Custom health bar (GTA SA health bar is no longer used)
- Adjust 3D health bar value only to maintain server sided health
- And i guess give infinite health to client side so whenever you fall you won't be affected
Re: Remove fall damage -
GoldenLion - 25.08.2016
No, I have custom damage system in my script, it would totally mess it up. And I'm not planning to change anything if I'd use it.
Re: Remove fall damage -
Shinja - 25.08.2016
Try
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
new Float:hp;
if(weaponid == 54) GetPlayerHealth(playerid, hp), hp+=amount, SetPlayerHealth(playerid, hp);
return 1;
}
Re: Remove fall damage -
GoldenLion - 25.08.2016
Quote:
Originally Posted by Shinja
Try
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
new Float:hp;
if(weaponid == 54) GetPlayerHealth(playerid, hp), hp+=amount, SetPlayerHealth(playerid, hp);
return 1;
}
|
Yeah, I could do that myself, but I want to totally remove the damage, so player won't die when they fall.
Re: Remove fall damage -
Stinged - 25.08.2016
Quote:
Originally Posted by GoldenLion
No, I have custom damage system in my script, it would totally mess it up. And I'm not planning to change anything if I'd use it.
|
Quote:
Originally Posted by GoldenLion
Hi, how is it possible to remove fall damage? Slice removed it in weapon-config.inc, but how?
|
weapon-config.inc uses that plugin. There's no other way to cancel fall damage.
Re: Remove fall damage -
GoldenLion - 25.08.2016
But Slice made that somehow for weapon-config.inc. Your health can be unlimited, but if you fall from very high you will die anyways if I'm right, but Slice removed that somehow.
Re: Remove fall damage -
Stinged - 25.08.2016
Yes, like I said before, weapon-config uses SKY plugin.
Re: Remove fall damage -
Maheerali - 26.08.2016
Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if (issuerid == INVALID_PLAYER_ID)
{
return 0;
}
}
//This will cause no damage to player if player fall or damage himself