0 Members and 1 Guest are viewing this topic.
var dmg: array[1..32] of single;time: array[1..32] of integer; function OnPlayerCommand(ID: byte; text: string): boolean;var hp: integer;beginif getpiece(text,' ',0) = '/infiserk' then begin if dmg[id] = 1 then begin dmg[ID] := 4; exit; end; if dmg[id] = 4 then begin dmg[ID] := 1; exit; end; end;if getpiece(text,' ',0) = '/serk' then begin dmg[ID] := 4; time[ID] := 12; end;end;procedure AppOnIdle(Ticks: integer);var i: byte; hp: integer;beginfor i := 1 to 32 do beginif getplayerstat(i,'active') then beginif time[i] > 0 then begin dec(time[i],1); DrawText(i,'Beserk - ' + IntToStr(time[i]),60,$FFFF0000,0.12,250,390); end;if time[i] = 0 then dmg[i] := 1;end;end;end;function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer):integer;beginresult := damage*dmg[ID];end;procedure OnJoinGame(ID, Team: byte);begindmg[ID] := 1;time[ID] := 0;end;code]