Whick callback i should use if i want make less 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: Whick callback i should use if i want make less damage? (
/showthread.php?tid=630508)
Whick callback i should use if i want make less damage? -
henkas - 15.03.2017
Hi
i want make if someone hit me i lose less damage. So where i should try make this system at which callback, because OnPlayerTakeDamage would work with opponent not me, right? So i will use this code
Код:
if ( amount > 2 )
{
new Float:playerHp;
GetPlayerHealth( playerid, playerHp );
SetPlayerHealth( playerid, playerHp - ( amount*5/100 ) );
Where should i put this? I tried with OnPlayerTakeDamage bat then opponent lose less hp not me
Re: Whick callback i should use if i want make less damage? -
Flamehaze7 - 15.03.2017
You can use this if you want to edit the damage for the weapons, it's really a nice include
https://github.com/oscar-broman/samp-weapon-config
Otherwise you can use OnPlayerTakeDamage with your function
issuerid = the one who did damage
playerid = the one who receive the damage
Re: Whick callback i should use if i want make less damage? -
henkas - 15.03.2017
Quote:
Originally Posted by Flamehaze7
You can use this if you want to edit the damage for the weapons, it's really a nice include https://github.com/oscar-broman/samp-weapon-config
Otherwise you can use OnPlayerTakeDamage with your function
issuerid = the one who did damage
playerid = the one who receive the damage
|
Thanks i now realize what i did wrong