OnPlayerGiveDamage
#1

Hello, i have a problem on my server with OnPlayerGiveDamage.

I have this code

Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
    if(damagedid != INVALID_PLAYER_ID) {
        if(PlayerInfo[playerid][pGroup] == PlayerInfo[playerid][pGroup] && WarActive[PlayerInfo[playerid][pMember]] > 0) {
            amount = 0;
            return 0;
        }
    }
    return 1;
}
As far I know, return 0 stop the function to be executed, but the player still take damage..
Reply


Messages In This Thread
OnPlayerGiveDamage - by None1337 - 28.12.2017, 23:45
Re: OnPlayerGiveDamage - by Kane - 28.12.2017, 23:47
Re: OnPlayerGiveDamage - by None1337 - 29.12.2017, 00:16
Re: OnPlayerGiveDamage - by RedFusion - 29.12.2017, 00:52
Re: OnPlayerGiveDamage - by None1337 - 29.12.2017, 09:15
Re: OnPlayerGiveDamage - by Ritzy2K - 29.12.2017, 10:03
Re: OnPlayerGiveDamage - by JaKe Elite - 29.12.2017, 10:09
Re: OnPlayerGiveDamage - by RedFusion - 29.12.2017, 14:03

Forum Jump:


Users browsing this thread: 2 Guest(s)