0 Members and 1 Guest are viewing this topic.
const HeightFromPlayer = 50; //How far up from player the nova is Speed = 10; //Speed of bullets (10 isn't so much, like 100 in soldats Weapon.ini i think) Damage = 100000; //damage? Style = 2; //Style of bullets Amount = 100; //Amount of nades (bullets if ye changed style)var Countdown: array[1..32] of integer; Armed: array[1..32] of boolean;////Nova by the greatest scripter of mankind, Avarax =) procedure Nova(const X,Y,speed,decentralize,power: single; ID,style: byte; n: integer);var i: integer; angle: single;begin angle := 2*pi/n; for i:=0 to n do CreateBullet(X+cos(angle*i)*decentralize, Y+sin(angle*i)*decentralize, cos(angle*i)*speed, sin(angle*i)*speed, power,style , ID );end;function onplayercommand(id: byte; text: string): boolean;begin case text of '/arm': if Armed[ID] = false then begin Armed[ID] := true; Countdown[ID] := 3; WriteConsole(ID,'You have armed da suicide bomb',$123321); //<<--- mah favour hex color XD end; end; result:=falseend;procedure AppOnIdle(ticks: integer);var i: integer;begin for i := 1 to 32 do if Armed[i] = true then begin if Countdown[i] > 0 then begin Countdown[i]:= Countdown[i] - 1; end else if Countdown[i] = 0 then begin DoDamage(i,400); Nova(GetPlayerStat(I,'X'), GetPlayerStat(I,'Y')-HeightFromPlayer, Speed, 0, Damage, I, Style, Amount); WriteConsole(I,'KABOOOM',$123321); Armed[i] := false; exit; end; end;end;
//be a badass and shoot nades in all directions, credits for iDante for making this for i := 1 to 360 do CreateBullet(PlayerX, PlayerY, NadeSpeed*cos(i), NadeSpeed*sin(i),100, 2, PlayerID);