0 Members and 1 Guest are viewing this topic.
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin if (IDToName(Victim) = 'Yamatsu Hikori') then begin if (Damage > 1000) then begin Result := Damage - (Damage + 1); end else result := Damage Div 3; end else begin Result := Damage; end;end;
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin Result := Damage; if IDToName(Victim) = 'Yamatsu Hikori' then begin if Damage > 1000 then begin Result := 0; end else begin Result := Damage / 3; end; end;end;
iDante, your code makes everyone else take 0 damage too. You didnt specify Result when the first IF returns false. And you have an unclosed begin.
Quote from: EnEsCe on August 14, 2008, 01:55:55 amiDante, your code makes everyone else take 0 damage too. You didnt specify Result when the first IF returns false. And you have an unclosed begin.Might wanna get your eyes checked. It works. He uses four begins and four ends. And he made the Result equal Damage before the first IF.