Author Topic: Simple Kamikaze script !  (Read 2924 times)

0 Members and 1 Guest are viewing this topic.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 558
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Simple Kamikaze script !
« on: July 22, 2010, 02:51:48 pm »
Script Name: Simple Kamikaze
Script Description: This is a simple kamikaze script that able human player too explode when they die and too explode by typing /boom. You can also explode all human in your server (/Bomball)
(This script can easily be added to big script to make skills or other thing (be creative :P)
Original Author(s): Mich1103 (Some help by FalconPL)
Core Version: 2.6.5
Code:
Code: [Select]
Procedure Kamikaze(ID: byte);
var
  X, Y: single;
 begin
    GetPlayerXY(ID, X, Y)
     CreateBullet(X, Y - 10, 0, 0,100, 4, 1);
      CreateBullet(X, Y - 10, 1, 1,100, 4, 1);
       CreateBullet(X, Y - 10, 2, 2,100, 4, 1);
       DoDamage(ID,4000);
      WriteConsole(0,Getplayerstat(ID,'name')+' has been blowed up !',color);
     end;
I dont know if there is error or a better way to do it ...
Anyway its my first script so :P ...

« Last Edit: July 22, 2010, 03:01:14 pm by mich1103 »

Offline kosik231

  • Major
  • *
  • Posts: 70
  • Where can I find Your soul?
Re: Simple Kamikaze script !
« Reply #1 on: July 22, 2010, 04:28:52 pm »
Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
   for i:= 1 to 32 do if GetPlayerStat(i,'Human') then begin
   if Text = '/bomball' then begin
       WriteLn('*You explode all human in your server !*');
   Kamikaze(i);
   end;           
    end;
         end;
erm... If Text = '/boomall' in loop...? i think its wrong :) wirst text check, then loop...
For signatures, you are allowed only one image in your signature which may not be wider and taller than 300 and 125 pixels, and may not be over 20kB in file size. No BMPs are allowed.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 558
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: Simple Kamikaze script !
« Reply #2 on: July 22, 2010, 04:51:53 pm »
Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
   for i:= 1 to 32 do if GetPlayerStat(i,'Human') then begin
   if Text = '/bomball' then begin
       WriteLn('*You explode all human in your server !*');
   Kamikaze(i);
   end;           
    end;
         end;

that was like that ....

Offline kosik231

  • Major
  • *
  • Posts: 70
  • Where can I find Your soul?
Re: Simple Kamikaze script !
« Reply #3 on: July 22, 2010, 06:12:01 pm »
i think its not...
Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
var i: integer;
begin
if Text = '/bomball' then begin
  for i:= 1 to 32 do
if GetPlayerStat(i,'Human') then begin
Kamikaze(i);
WriteLn('*You explode all human in your server !*');
end;       
end;
Result := false;     
end;
For signatures, you are allowed only one image in your signature which may not be wider and taller than 300 and 125 pixels, and may not be over 20kB in file size. No BMPs are allowed.

Offline amb2010

  • Camper
  • ***
  • Posts: 264
  • Fear the dot ...
Re: Simple Kamikaze script !
« Reply #4 on: July 22, 2010, 08:33:23 pm »
You really should compile and test the scripts, not just post them and say "I don't think there is an error" Also kosik231 is right, you should check the text then loop it since that part there would really mess up the entire script. Right now it loops and checks 32 times whether the admin typed /bomball which if true would blow all the players up 32 times in a row which is not what you want it to do. So again you really should compile and test your script before you post it.

(Edit) Also you forgot a semi-colon( ; ) on the GetPlayerXY(ID,X,Y)
« Last Edit: July 22, 2010, 08:35:01 pm by amb2010 »
And as the lyrics go in the United State's national anthem: "America, f**k YEAH!".