FightStyles and Realistic Damage - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: FightStyles and Realistic Damage (
/showthread.php?tid=410895)
FightStyles and Realistic Damage -
DJ_Shocker - 27.01.2013
I'm currently using a realistic damage system on my server, at the same time players can have different fight styles and can train to learn these fight styles.
However, when a player has a fight style other than "normal" (fist fighting), it takes NO armor, if a player has armor.
Was wondering if anyone had some ideas or a way to fix this.
Re: FightStyles and Realistic Damage -
XStormiest - 27.01.2013
hmm.... i think something like..
pawn Код:
if( GetPlayerFightingStyle(playerid) == FIGHT_STYLE_BOXING)
{
new Float:Armour;
new Float:Health
GetPlayerHealth(damagedid,Health);
GetPlayerArmour(damagedid,Armour);
if(Armour > 0) return Armour --;
if(Armour == 0) return Health--;
return 1;
}
add this is to OnPlayerGiveDamage,or OnPlayerUpdate and switch FIGT_STYLE_BOXING, ( above) to the specific type... you want to