0 Members and 1 Guest are viewing this topic.
geez...
And as the lyrics go in the United State's national anthem: "America, f**k YEAH!".
function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1)<>0 then begin if X1 > X2 then result:= arctan((y2 - y1) / (x2 - x1)) + Pi else result:= arctan((y2 - y1) / (x2 - x1)); end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;procedure Wave(X,Y,Direction,Offset,Radius,Speed,Power,RoomPerBullet,Radiation: single; Bullettype,Bulletcount,Owner: byte);var i: integer; angle,centerX,centerY: single;begin centerX:=X-cos(Direction)*Radius; centerY:=Y-sin(Direction)*Radius; angle := (Bulletcount * RoomPerBullet) / (2 * pi * Radius); for i:=-Bulletcount div 2 to Bulletcount div 2 + Bulletcount mod 2 do CreateBullet(centerX+cos(Direction+angle*i)*Radius+cos(Direction)*Offset,centerY+sin(Direction+angle*i)*Radius+sin(Direction)*Offset, cos(Direction+angle*i*Radiation)*Speed, sin(Direction+angle*i*Radiation)*speed,power,Bullettype,Owner);end;
if Copy(Text,1,5) = '/shockwave ' then beginfunction Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1)<>0 then begin if X1 > X2 then result:= arctan((y2 - y1) / (x2 - x1)) + Pi else result:= arctan((y2 - y1) / (x2 - x1)); end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;procedure Wave(X,Y,Direction,Offset,Radius,Speed,Power,RoomPerBullet,Radiation: single; Bullettype,Bulletcount,Owner: byte);var i: integer; angle,centerX,centerY: single;begin centerX:=X-cos(Direction)*Radius; centerY:=Y-sin(Direction)*Radius; angle := (Bulletcount * RoomPerBullet) / (2 * pi * Radius); for i:=-Bulletcount div 2 to Bulletcount div 2 + Bulletcount mod 2 do CreateBullet(centerX+cos(Direction+angle*i)*Radius+cos(Direction)*Offset,centerY+sin(Direction+angle*i)*Radius+sin(Direction)*Offset, cos(Direction+angle*i*Radiation)*Speed, sin(Direction+angle*i*Radiation)*speed,power,Bullettype,Owner);end;
function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1)<>0 then begin if X1 > X2 then result:= arctan((y2 - y1) / (x2 - x1)) + Pi else result:= arctan((y2 - y1) / (x2 - x1)); end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;procedure Wave(X,Y,Direction,Offset,Radius,Speed,Power,RoomPerBullet,Radiation: single; Bullettype,Bulletcount,Owner: byte);var i: integer; angle,centerX,centerY: single;begin centerX:=X-cos(Direction)*Radius; centerY:=Y-sin(Direction)*Radius; angle := (Bulletcount * RoomPerBullet) / (2 * pi * Radius); for i:=-Bulletcount div 2 to Bulletcount div 2 + Bulletcount mod 2 do CreateBullet(centerX+cos(Direction+angle*i)*Radius+cos(Direction)*Offset,centerY+sin(Direction+angle*i)*Radius+sin(Direction)*Offset, cos(Direction+angle*i*Radiation)*Speed, sin(Direction+angle*i*Radiation)*speed,power,Bullettype,Owner);end;function OnCommand(ID: byte; text: string): boolean;begin if text = '/YOURCOMMANDHERE' then begin //// <---- Modify the YOURCOMMANDHERE Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),20,35,19,100,1.9,0,14,5,ID); /// modify the wave, add more waves if you like end; result := false;end;
Can someone say me how i can make that the bullets fly i all directions??
Is it possible that i can the bullets shot on a bot or Player? not in the direction in that you move?
Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),20,35,19,100,1.9,0,14,5,ID);
,Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY'))
function Aim(const X1,Y1,X2,Y2: single) : single;begin if (X2 - X1)<>0 then begin if X1 > X2 then result:= arctan((y2 - y1) / (x2 - x1)) + Pi else result:= arctan((y2 - y1) / (x2 - x1)); end else begin if Y2 > Y1 then result:= Pi/2 + Pi/4; if Y2 < Y1 then result:= -Pi/2 + Pi/4; end;end;procedure Wave(X,Y,Direction,Offset,Radius,Speed,Power,RoomPerBullet,Radiation: single; Bullettype,Bulletcount,Owner: byte);var i: integer; angle,centerX,centerY: single;begin centerX:=X-cos(Direction)*Radius; centerY:=Y-sin(Direction)*Radius; angle := (Bulletcount * RoomPerBullet) / (2 * pi * Radius); for i:=-Bulletcount div 2 to Bulletcount div 2 + Bulletcount mod 2 do CreateBullet(centerX+cos(Direction+angle*i)*Radius+cos(Direction)*Offset,centerY+sin(Direction+angle*i)*Radius+sin(Direction)*Offset, cos(Direction+angle*i*Radiation)*Speed, sin(Direction+angle*i*Radiation)*speed,power,Bullettype,Owner);end;function OnCommand(ID: byte; text: string): boolean;begin if text = '/wave' then begin Wave(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),Aim(0,0,GetPlayerStat(ID,'VelX'),GetPlayerStat(ID,'VelY')),20,35,19,100,1.9,0,14,5,ID); end; result := false;end;
how would i find how many i need?
what would happen if i used like 20 Wave()'s lol