05.02.2014, 08:53
That' not a function, but it can aswell be shortened:
I think this should do pretty much the same.
pawn Code:
stock damagePlayer(playerid, Float: fDamage) {
new
Float: fHealth,
Float: fArmour
;
GetPlayerHealth(playerid, fHealth);
GetPlayerArmour(playerid, fArmour);
fHealth += fArmour - fDamage;
SetPlayerArmour(playerid, (fHealth > 100.0) ? (fHealth - 100.0) : (0.0));
SetPlayerHealth(playerid, (fHealth > 100.0) ? (100.0) : (fHealth));
}

