09.09.2012, 20:45
When a player takes damage, his/her health/armour goes straight back up, I attempted to fix this but nothing worked, here's the necessary code;
pawn Код:
enum pInfo
{
Float:Health,
Float:Armour,
};
public OnPlayerShootPlayer(Float:HealthLost,Float:ArmourLost)
public OnPlayerUpdate(playerid)
{
GetPlayerWeaponAmmo(playerid);
new Float:health, Float:armour;
GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armour);
if(health != Player[playerid][Health])
{
SetPlayerHealth(playerid, Player[playerid][Health]);
}
if(armour != Player[playerid][Armour])
{
SetPlayerArmour(playerid, Player[playerid][Armour]);
}
return 1;
}