17.04.2014, 10:23
I don't remeber the exact name of the new 0.3z callback, but if you want, you can use OnPlayerTakeDamage
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(team[playerid] == team[issuerid])
{
new Float:health, Float:arm;
if(GetPlayerArmour(playerid) > 0)
{
GetPlayerArmour(playerid, arm);
SetPlayerArmour(playerid, floatadd(arm, amount);
}
else
{
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, floatadd(health, amount);
}
return 1;
}