0 Members and 2 Guests are viewing this topic.
var NoDamage: boolean;(* Gives a player a certain amount of vest *)procedure SetVest(ID: Byte; VestAmount: integer);begin GiveBonus(ID, 3); NoDamage := true; DoDamage(ID, 302 - VestAmount*302/100); NoDamage := false;end;function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin if (NoDamage) then begin Result := 0; end else begin Result := Damage; end;end;
Is VestAmount like a % or the same intervals as normal for vest (whatever that is)?
What is the command im suppose to type in?
function OnCommand(ID: byte; Text: string): boolean;begin if lowercase(GetPiece(Text, ' ', 0)) = '/setvest' then SetVest(StrToInt(GetPiece(Text, ' ', 1)), StrToInt(GetPiece(Text, ' ', 2)));end;
procedure SetVest(ID: Byte; VestAmount: integer);begin GiveBonus(ID, 3); While GetPlayerStat(ID, 'Vest') < VestAmount do DoDamage(ID, 2);end;