0 Members and 1 Guest are viewing this topic.
Result := Damage * Output[ID] * Input[ID]; orResult := Damage * (Output[ID] - Input[ID]);
Result := round(MULTIPLYER * strtofloat(inttostr(Damage)));
Code: [Select]Result := round(MULTIPLYER * strtofloat(inttostr(Damage)));Use singles for the multiplyer.
...if Damage < 5000 thendec(HealthLeft[Victim],Round(Damage * Bot[Shooter].DamageOutput * Bot[Victim].Input));elsedec(HealthLeft[Victim],Round(Damage * Bot[Shooter].DamageOutput * Bot[Victim].Input / 75));...
first of all, if you have "else" after a single line, there should be no semicolon.
result := damage;
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;begin Result := Damage; if Assignable(Victim) then begin if HealthLeft[Victim] > 0 then begin Result := -Damage; if Damage < 5000 then begin dec(HealthLeft[Victim],Damage); end else begin dec(HealthLeft[Victim],Round(Damage/75)); end; if Bot[Victim].ShowHealth then ShowHealth(Victim,Shooter); if HealthLeft[Victim] < 1 then DoDamageBy(Victim,Shooter,500); end; end;end;