Author Topic: what i did wrong...?  (Read 971 times)

0 Members and 1 Guest are viewing this topic.

Offline Th3_Th1ng

  • Major(1)
  • Posts: 5
  • lets hug medkits :p wheres teh lav?
what i did wrong...?
« on: June 15, 2008, 03:38:26 am »
well... i tried to do some "forceweapon" thing to my server but then it just crashed...

Quote
      '/weap': begin
         str:=Text;
         Delete(str,1,6);
         weapon:=255;
         if (Length(GetPiece(str,' ',0))<3) and (Is_Integer(GetPiece(str,' ',0))) then begin
            weapon:=strtoint(GetPiece(str,' ',0));
            if (weapon<0) or (weapon>16) then begin
               WriteConsole(ID,'Weapon ID numbers can only range 0 to 16.',COLOR_WARNING);
               weapon:=254;
               end;
         end else for i:=0 to 16 do begin
            if MaskCheck(WeaponNameByNum(i),'*'+str+'*') then begin
               weapon:=i;
               break;
               end;
            end;
         
         if weapon < 254 then begin
            ForceWeapon(ID,weapon,GetPlayerStat(ID,'secondary'),255);
            WriteConsole(ID,'You'+#39+'ve been given the '+WeaponNameByNum(weapon)+'.',COLOR_PLAYERSETTING);
         end else if weapon = 255 then begin
            WriteConsole(ID,'Couldn'+#39+'t find any weapon whose name contains "'+str+'".',COLOR_WARNING);
            end;
         end;

Thanks already ;) hope someone gives me answer
I think ppl knows me as Th3 Th1ng

You are just an object, i control you.

If you feel like insulted, tell it to hand. Hand will listen you.

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: what i did wrong...?
« Reply #1 on: June 16, 2008, 01:38:39 pm »
First of all, you copied all of that from FistBox, secondly you'r missing really much of things. And thirdly, send me the whole script you made so i can fix it.
If thats the whole script........ then someone else can fix it XD
Also Known As REIMA


Lol Happles (happy apples)

Offline Th3_Th1ng

  • Major(1)
  • Posts: 5
  • lets hug medkits :p wheres teh lav?
Re: what i did wrong...?
« Reply #2 on: June 17, 2008, 01:39:01 pm »
yeh.. i know that i copied it from toumaz fistbox, but i though that works cos it works on fistbox too :D well shantec, i think u have this script, so can u fix it for me ;) yeah, and sorry toumaz, i should not copy that

Toumaz, if you still feel like insulted, tell it to hand. Hand will listen you.
I think ppl knows me as Th3 Th1ng

You are just an object, i control you.

If you feel like insulted, tell it to hand. Hand will listen you.