28.12.2017, 23:45
Hello, i have a problem on my server with OnPlayerGiveDamage.
I have this code
As far I know, return 0 stop the function to be executed, but the player still take damage..
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; }