Author Topic: *Server*  (Read 584 times)

0 Members and 1 Guest are viewing this topic.

Offline Galaxyman

  • Major(1)
  • Posts: 14
*Server*
« on: December 06, 2008, 02:00:29 pm »
Hey,

Can Someone help me?
Im searching for a script which makes the following:

when i enter /say xxx  in Arsse or ingame, the Server makes *Server* xxx.
now im searching for a script which makes the server say *Galaxyman* xxx when i do /say xxx.

is that possible/can someone make me such a script?

mfg Galaxyman

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: *Server*
« Reply #1 on: December 06, 2008, 06:40:39 pm »
Code: [Select]
function OnCommand(ID: Byte; Text: String): Boolean;
begin
if lowercase(copy(Text,0,4)) = '/say' then begin
WriteConsole(0,'*Galaxyman* '+copy(Text,6,length(Text)),$FFFF00);
Result := true;
end;
end;
That what you wanted?

Offline Galaxyman

  • Major(1)
  • Posts: 14
Re: *Server*
« Reply #2 on: December 07, 2008, 05:10:03 am »
yeh thx :D

Offline rumpel

  • Camper
  • ***
  • Posts: 410
Re: *Server*
« Reply #3 on: December 07, 2008, 07:02:55 am »
lol man.. wieso fragst du in 2 foren? dumm?

nimm das:

Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
var
  Name: string;
begin
  Result := false;
  if ID = 255 then Name := 'Server' else Name := GetPlayerStat(ID,'Name');
  if Copy(Text,1,5) = '/say ' then begin
    Result := true;
    WriteConsole(0,'[' + Name + '] ' + Copy(Text,6,Length(Text)),$FF52DD52);
  end;
  if GetPiece(Text,' ',0) = '/pm' then begin
    Result := true;
    try
      WriteConsole(StrtoInt(GetPiece(Text,' ',1)),'[PM] [' + Name + '] ' + Copy(Text,Length(GetPiece(Text,' ',1)) + 5,Length(Text)),$FF52DD52);
    except end;
  end;
end;

(du weisst das in 2 foren das selbe fragen eigtl total bescheuert ist?, da helfen dir die in einem forum und naja dann isses umsonst -.-)
banned.