Hello, i have scripting something in OnPlayerGiveDamage, something like this:
The text appears, but the damageid still take damage, why?
Code:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(damagedid != INVALID_PLAYER_ID)
{
if(PlayerInfo[damagedid][pFreezeTime] != 0)
{
SendClientMessage(playerid, -1, "This player is frozen, you can't shoot him.");
amount = 0;
return 0;
}
}
return 1;
}