Author Topic: Messages across screen?  (Read 1600 times)

0 Members and 1 Guest are viewing this topic.

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Messages across screen?
« on: February 05, 2008, 10:14:59 am »
How do you make messages come across the screen on joining the server? I know nothing about scripting so help pls.  :)

Death is the solution to all problems. No man; no problem.
-Joseph Stalin

Offline Railor

  • Major(1)
  • Posts: 16
Re: Messages across screen?
« Reply #1 on: February 05, 2008, 10:46:57 am »
Code: [Select]
const
WelcomeMessage = 'Welcome to ..';

procedure OnJoinTeam(ID, Team: byte);
begin
DrawText(ID,WelcomeMessage,360,RGB(255,0,0),0.15,40,240);
end;

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Re: Messages across screen?
« Reply #2 on: February 05, 2008, 12:19:52 pm »
I just did that, and now the server won't start.

Death is the solution to all problems. No man; no problem.
-Joseph Stalin

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Messages across screen?
« Reply #3 on: February 05, 2008, 12:38:23 pm »
It should work...

It does work. (for me)

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Re: Messages across screen?
« Reply #4 on: February 05, 2008, 12:43:07 pm »
Where do you put it then?

BTW here's what I've done:

http://img112.imageshack.us/img112/1894/87613809yh2.jpg

Death is the solution to all problems. No man; no problem.
-Joseph Stalin

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Messages across screen?
« Reply #5 on: February 05, 2008, 01:18:36 pm »
DrawText(ID, WelcomeMessage, 360, RGB(255,0,0), 0.15, 40, 240);

Should be as simple as that.

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Re: Messages across screen?
« Reply #6 on: February 05, 2008, 01:40:43 pm »
OK I added ID now, but still. When I click the server the Command Prompt thing comes up and then closes instantly.

Death is the solution to all problems. No man; no problem.
-Joseph Stalin

Offline eNoVa

  • Major(1)
  • Posts: 6
Re: Messages across screen?
« Reply #7 on: February 05, 2008, 03:44:09 pm »
Make your way in cmds through the folders to the soldatserver.exe and open it
So you ll be able to read the errors...like wrong bracked used ;P ( '(' not '<'  )
If you are as lazy as i, You can make a batch file which open it

Just type that lines in editor and save it as *.bat
You can type relative directories and add parameters.
eg:

myfiles\soldatserver\soldatserver.exe -safe 0 -sl 0


ahh BTW If you want to write your message over more lines you can use "chr(13)+chr(10)"

« Last Edit: February 05, 2008, 03:53:59 pm by eNoVa »

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Messages across screen?
« Reply #8 on: February 06, 2008, 01:44:14 am »
BRADEN, maybe you should learn some basic pascal syntax before trying to actually code something ::)

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Messages across screen?
« Reply #9 on: February 06, 2008, 03:05:37 am »
(Do you have two OnJoinTeam()'s?)

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Re: Messages across screen?
« Reply #10 on: February 06, 2008, 03:14:17 pm »
I did use '(' but in the pascal program it looks like a '<'. Also I don't see two join teams?

Death is the solution to all problems. No man; no problem.
-Joseph Stalin

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: Messages across screen?
« Reply #11 on: February 06, 2008, 04:05:04 pm »
Maybe you should attach a copy of the file... It's hard to guess what's wrong.

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: Messages across screen?
« Reply #12 on: February 07, 2008, 01:27:40 am »
put the const and the line below it above all other stuff.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline eNoVa

  • Major(1)
  • Posts: 6
Re: Messages across screen?
« Reply #13 on: February 07, 2008, 06:25:23 am »
I did use '(' but in the pascal program it looks like a '<'. Also I don't see two join teams?
I don't know, but in the line where you used "drawtext" it really seem to be a "<" and not a "(" ...
but I'm not a compiler

Offline BRADEN

  • Camper
  • ***
  • Posts: 319
Re: Messages across screen?
« Reply #14 on: February 07, 2008, 01:03:12 pm »
OMFG! ENOVA! I got confused about the way ( look and started using <'s. Thanks you guys. Stupid program lol.

Death is the solution to all problems. No man; no problem.
-Joseph Stalin

Offline rhide

  • Major
  • *
  • Posts: 60
  • Coffee-addict
    • Vrastar-Hai soldat clan
Re: Messages across screen?
« Reply #15 on: February 10, 2008, 03:53:31 pm »
Dont double click the server icon, but run it through a command shell instead. That way you'll be able to see the pascal interpretors error messages
Warning! Division by zero seriously injures yourself and the people in your surroundings.

Proud member of Vrastar-Hai:
http://www.guldheden.com/~erga050/vrastar-hai