Author Topic: disable command /gmute  (Read 2321 times)

0 Members and 1 Guest are viewing this topic.

Offline ctf_worldtour

  • Major(1)
  • Posts: 30
  • banned
    • visit my Homepage
disable command /gmute
« on: April 25, 2007, 03:06:35 pm »
is it possible to disable a command like /gmute in script, for example here:

    procedure OnCommand(ID: integer;Text: string);
    begin
    end;

any1 got an idea?

cu wt [Bow]


Offline ctf_worldtour

  • Major(1)
  • Posts: 30
  • banned
    • visit my Homepage
Re: disable command /gmute
« Reply #2 on: April 26, 2007, 02:55:01 am »
http://enesce.com/help/

RTFM

a piece of code would be more helpfull enesce    ???  is it possible to disable a command in server version 2.5.4 ?

 8)  [DE]  :o

 btw, i know your script help page

« Last Edit: April 26, 2007, 03:10:18 am by ctf_worldtour »

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: disable command /gmute
« Reply #3 on: April 26, 2007, 09:38:20 am »
in soldat server 2.6.0, OnCommand will look like this:

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
as you can see, OnCommand itself has a boolean result, which is either true or false. true means, that the command passes through and if it is a valid command, it will get executed. if the result is false, the command will be ignored. so you can just script something like this:

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
  If copy(text,1,6) = '/gmute' then
    result:=false
  else
    result:=true;
end;
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline ctf_worldtour

  • Major(1)
  • Posts: 30
  • banned
    • visit my Homepage
Re: disable command /gmute
« Reply #4 on: April 26, 2007, 09:58:52 am »
in soldat server 2.6.0, OnCommand will look like this:

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
begin
  If copy(text,1,6) = '/gmute' then
    result:=false
  else
    result:=true;
end;

so no chance in 2.5.4?   ???   ;D  [Minigun] :-[


Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: disable command /gmute
« Reply #5 on: April 26, 2007, 10:00:51 am »
no, not really  [fist]
 [knife] [MP5] [law] [M2] [medikit] [clusters] [Predator] [Ruger] [Bravoguy] [flamethrower] [Minigun]
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline ctf_worldtour

  • Major(1)
  • Posts: 30
  • banned
    • visit my Homepage
Re: disable command /gmute
« Reply #6 on: April 27, 2007, 05:01:50 am »
any script-god can give me piece of code???

  8) [saw] :'(

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: disable command /gmute
« Reply #7 on: April 27, 2007, 05:32:35 am »
He just gave you a "piece of code", gosh... read the topic.

Offline ctf_worldtour

  • Major(1)
  • Posts: 30
  • banned
    • visit my Homepage
Re: disable command /gmute
« Reply #8 on: April 27, 2007, 06:41:52 am »
He just gave you a "piece of code", gosh... read the topic.

sure, but its for server 2.6 and its not yet available, as far i know, i need code for 2.5.4 server version ...

 :'(  [vest] [berzerk]  :)

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: disable command /gmute
« Reply #9 on: April 27, 2007, 06:43:11 am »
You can't do that in 2.5.4 as far as I know.

Offline mikembm

  • Soldier
  • **
  • Posts: 210
Re: disable command /gmute
« Reply #10 on: April 27, 2007, 12:54:39 pm »
No one is going to write code for 2.5.4 when 2.6 comes out in 2 days

Offline ctf_worldtour

  • Major(1)
  • Posts: 30
  • banned
    • visit my Homepage
Re: disable command /gmute
« Reply #11 on: April 28, 2007, 05:14:08 am »
No one is going to write code for 2.5.4 when 2.6 comes out in 2 days
k thats an answer wich is practical, thx mikembm.

 :'(  [flamekit]  ;D