21.01.2016, 06:24
I don't see anything maxing out health. Although I found some flaws, try this:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(kickback[issuerid] == 1)
{
if(weaponid == 30 || weaponid == 31 || weaponid == 29)
{
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerFacingAngle(playerid, angle);
GetPlayerVelocity(playerid, x, y, z);
SetPlayerVelocity(playerid, x+0.1, y+0.1, z+0.2);
SetPlayerFacingAngle(playerid, angle);
//God knows what is happening here..but let's carry on..
}
}
if(damager[issuerid] == 1)
{
if(weaponid == 30 || weaponid == 31 || weaponid == 29)
{
new Float:Health, Float:Armour;
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health -30);
GetPlayerArmour(playerid, Armour);
SetPlayerArmour(playerid, Armour -30);
}
}
return 1;
}