Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Problem with OnPlayerGiveDamage

$
0
0
Hello, i have scripting something in OnPlayerGiveDamage, something like this:

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;
}

The text appears, but the damageid still take damage, why?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>