0 Members and 1 Guest are viewing this topic.
//This scripts original author is DorkeyDear (Curt)//Script modified by Shantec a.k.a Reima ( a.k.a Reima The Warper)const Color = $FFFFFFFF; cGood = $00EE20; cBad = $EE2000; cError = $AA0000; //removed manual damage set, added oncommand damage setvar Omnio, AfterRespawn: array[1..32] of boolean; DmgModifier: array[1..32] of integer;procedure AppOnIdle(Ticks: cardinal);var i: byte;begin for i := 1 to 32 do if AfterRespawn[i] then begin if Omnio[i] then begin GiveBonus(i, 1); DrawText(i, ' ', 0, $00000000, 0, 0, 0); Forceweapon(i,11,GetPlayerStat(i,'primary'),255); end; AfterRespawn[i] := false; end; if (Ticks mod 900) = 0 then begin for i := 1 to 32 do if GetPlayerStat(i, 'Active') = true then if Omnio[i] and (GetPlayerStat(i, 'Alive') = true) then begin GiveBonus(i, 1); DrawText(i, ' ', 0, $00000000, 0, 0, 0); end; end;end;procedure OmniOn(ID,Who: byte; dmg: integer);begin Omnio[Who] := true; DmgModifier[who]:= dmg; if GetPlayerStat(Who, 'Alive') = true then begin GiveBonus(Who, 1); Forceweapon(who,11,GetPlayerStat(Who,'primary'),255); DrawText(Who, ' ', 0, $00000000, 0, 0, 0); end; WriteConsole(Id, 'You have given ' + GetPlayerStat(Who, 'Name') + ' the OmniMod', Color); WriteConsole(Who, 'You have been given the OmniMod', cGood);end;procedure OmniOff(ID,Who: byte);begin Omnio[Who] := false; DmgModifier[who]:= 1; Forceweapon(who,255,255,255); GiveBonus(who, 0); WriteConsole(Id, 'You have taken the OmniMod from ' + GetPlayerStat(Who, 'Name'), Color); WriteConsole(Who, 'The OmniMod have been taken from you', cBad);end;procedure OnJoinGame(ID, Team: byte);begin Omnio[Id] := false; DmgModifier[id] := 1;end;function OnCommand(ID: byte; Text: string): boolean;var Who: byte; dmg: integer;begin case LowerCase(GetPiece(Text,' ',0)) of '/omnimod': try Who := StrtoInt(GetPiece(Text,' ',1)); dmg := StrtoInt(GetPiece(Text,' ',2)); if Omnio[who] = false then begin if not GetPlayerStat(Who, 'Active') then StrtoInt(' '); OmniOn(ID,Who,dmg); end else begin OmniOff(ID,Who); end; except if Omnio[Who] = false then begin WriteConsole(Id, 'Invalid player, or damage-modifier', cError); WriteConsole(Id, 'Use it like "/omnimod (ID) (Damage modifier)', cError); WriteConsole(Id, 'Normal damage = 1', cError); end else OmniOff(ID,Who); end; end;end;procedure OnPlayerRespawn(Id: byte);begin AfterRespawn[Id] := true;end;function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin case Omnio[Victim] of true: if Omnio[Shooter] = false then result := 0 else result := damage; false: if Omnio[Shooter] = true then result := (damage * DmgModifier[shooter]) else result := damage; end;end;
And as the lyrics go in the United State's national anthem: "America, f**k YEAH!".
.... For me, if i pick flamegod, it forces the primary to secondary and flamer to primary o.O