Author Topic: Disable Weapon Help?  (Read 3711 times)

0 Members and 1 Guest are viewing this topic.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Disable Weapon Help?
« Reply #20 on: June 25, 2009, 06:50:02 am »
Code: [Select]
if GetPlayerStat(Killer,'Kills') in [11..20] then begin
Just a question, what is 'in', does it check if one of the arrays is the number of kills, because iv'e  never heard about that.

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Disable Weapon Help?
« Reply #21 on: June 25, 2009, 06:59:31 am »
if the number of kills is into these numbers, it will do something.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Disable Weapon Help?
« Reply #22 on: June 25, 2009, 09:38:26 am »
Thanks for answer. Sounds quite helpfull.

Offline utkesmer

  • Major(1)
  • Posts: 44
Re: Disable Weapon Help?
« Reply #23 on: July 14, 2009, 06:09:01 am »
Can we create a procedure or function?

Like this...

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
   Result := false;

   MyProcedure;

end;

procedure MyProcedure(Text: string; ID: byte);
begin

   if MaskCheck(Text, '/alpha') then Command('/setteam1 '+INTTOSTR(ID) );
   // Just an example...

end;

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: Disable Weapon Help?
« Reply #24 on: July 14, 2009, 09:05:10 am »
You must call it like you declare.

For:
Code: [Select]
procedure MyProcedure(Text: string; ID: byte);
Example:
Code: [Select]
MyProcedure(Text, ID);

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: Disable Weapon Help?
« Reply #25 on: July 14, 2009, 10:23:24 am »
Also note that functions/procedures you make bust be declared/defined above where you want to call them. So in the example, above OnCommand u can say what MyProcedure is.