Author Topic: Simple script [!contact]  (Read 800 times)

0 Members and 1 Guest are viewing this topic.

Offline Hubiq

  • Soldier
  • **
  • Posts: 119
Simple script [!contact]
« on: January 13, 2013, 12:10:10 pm »
Hi, I need a simple script. I would like to when you type !contact information appeared "Email: my mail".

For example:

player writes: !contact

displayed: Email: [my email]

Please help.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Simple script [!contact]
« Reply #1 on: January 13, 2013, 02:47:56 pm »
Code: (pascal) [Select]
const
  MY_EMAIL = 'insert_your@email.here';
  COLOR = $FFFFFFFF; //white, ARGB format

OnPlayerSpeak(ID: Byte; Text: String);
begin
  if Text = '!contact' then
    WriteConsole(ID, 'Email: ' + MY_EMAIL, COLOR);
end;

I didn't check if it compiles or not, so if you have some errors popping out, let me know.

* FalconPL wonders what happen to pascal syntax highliter
« Last Edit: January 13, 2013, 02:49:52 pm by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Spotix

  • Major
  • *
  • Posts: 63
  • Shut up! I just give my sentimental side!
    • http://steamcommunity.com/id/Spotix
Re: Simple script [!contact]
« Reply #2 on: January 13, 2013, 02:54:10 pm »
Code: [Select]

procedure OnPlayerSpeak(ID: Byte; Text: string);
begin
   
  if (Text='!contact') then begin
   WriteConsole(ID, 'YourName  MSN     : youmail@hotmail.de', $23819C);
   WriteConsole(ID, '          Xfire   :  username', $23819C);
   WriteConsole(ID, '          E-mail  : youmail@hotmail.de', $23819C);
   WriteConsole(ID, '          Send your maps to  : youmail@hotmail.de', $23819C);
  end;
end;

I hope that is ok for you=)

Offline Hubiq

  • Soldier
  • **
  • Posts: 119
Re: Simple script [!contact]
« Reply #3 on: January 13, 2013, 04:13:01 pm »
@FalconPL @Spotix

Thanks :)