Whick callback i should use if i want make less damage?
#1

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
Reply
#2

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
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)