SA-MP Forums Archive
bigger 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: bigger damage (/showthread.php?tid=626484)



bigger damage - EskeL - 15.01.2017

as the topic how to do so with the appropriate weapons have asked the larger damage?

Regards!


Re: bigger damage - X337 - 16.01.2017

You can increase damage amount using OnPlayerTakeDamage callback.
Example:
Код:
OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) // This callback is called whenever player takes damage
{
	new Float:hp;
	GetPlayerHealth(playerid, hp);
	SetPlayerHealth(playerid, hp - 1.0); // It will increase damage by 1.0
	return 1;
}
It's just an example, it'll not work if player has armour.
There are some tutorials in this forums about custom damage that you might want to check.
https://sampforum.blast.hk/showthread.php?tid=558839
https://sampforum.blast.hk/showthread.php?tid=488539