RegisterRegister    Log inLog in    SearchSearch   

Post new topic   Reply to topic
Goto page 1, 2  Next 
View previous topic :: View next topic  
Author Message
Kybber



PostPosted: Tue Oct 10, 2006 8:38 pm    Post subject: How-to: HLTV Reply with quote

I just helped out with servers at a LAN, and had to
jump through a couple of hoops to get HLTV to work
properly. I'll therefore share my solution with this
forum. The server was installed under Linux, so
the first part of the solution may not apply to Windows-
users.

1. If you start HLTV immediately after installing,
it will fail. If you try to run the command from the
command-line, you will see it fails to locate some
files. You need to tell HLTV to look in the current
dir for these files.
Solution: Make a wrapper script for hltv.
Code:
# mv hltv hltv_orig

Create a new file called hltv and edit it:
Code:
# $EDITOR hltv

Insert the following:
Code:
#!/bin/bash
export LD_LIBRARY_PATH=`pwd`
exec ./hltv_orig $*

Make the new file executable:
Code:
chmod +x hltv


2. HLTV won't be able to connect since it doesn't
care about the serverpassword set in GC.
Solution: Modify the startup-string in GC.
Click the "games"-tab, followed by clicking the
"Half-Life TV" icon. Then click the "Configuration"-
Tab. Add the following before the +connect argument
on the command-line:
Code:
+serverpassword "%serverpass%"

The final commandline should now read (on one line):
Code:
-port %server:port% -norestart +exec hltv%server:port%.cfg +record hltvdemo%server:port% +serverpassword "%serverpass%" +connect %serverip%:%serverport%

Clikk "save"

HLTV should now work properly.
Back to top
View user's profile Send private message
adbot



PostPosted: Thu Mar 31, 2011 3:57 am 

compuwiz



PostPosted: Thu Feb 22, 2007 11:06 am    Post subject: Reply with quote

I can start it from the command line using that command now, but If i let game create do it, it shows
Code:
[gamecreate.x86] <defunct>
in the processes list, it keeps showing up and going away every few seconds.
Back to top
View user's profile Send private message
Kybber



PostPosted: Thu Feb 22, 2007 11:25 am    Post subject: Reply with quote

Try to remove the "exec" from the wrapper script.
Back to top
View user's profile Send private message
compuwiz



PostPosted: Thu Feb 22, 2007 11:32 am    Post subject: Reply with quote

Still nothing.
Back to top
View user's profile Send private message
compuwiz



PostPosted: Thu Feb 22, 2007 11:49 am    Post subject: Reply with quote

This is becoming to big of a hassle, I think ill just go back to using webmin to start it.
Back to top
View user's profile Send private message
compuwiz



PostPosted: Thu Feb 22, 2007 12:47 pm    Post subject: Reply with quote

If I can get it to work, I will use it.
Back to top
View user's profile Send private message
Kybber



PostPosted: Thu Feb 22, 2007 10:07 pm    Post subject: Reply with quote

Try the following variations on the exec-line above:

Code:
exec ./hlds_i686 $*

Code:
exec ./hlds_run $*

Code:
./hlds_i686 $*

Code:
./hlds_run $*


One of them may work. The reason I am suggesting
this is that I have a similar problem with my BF2
servers. Unless I start them from a wrapper script
(which I want to do anyway since I do some other
stuff before the server is started), they won't work
and I'll get defunct processes. This is all related to
how exec behaves when used to start a script contra
an executable, and how GC starts the top script/exe.
So just try out those four variations and see if one
works for you.

Oh, and make absolutely sure that it is your wrapper
that is called by GC.
Back to top
View user's profile Send private message
compuwiz



PostPosted: Thu Feb 22, 2007 11:35 pm    Post subject: Reply with quote

Kybber wrote:
Try the following variations on the exec-line above:

Code:
exec ./hlds_i686 $*

Code:
exec ./hlds_run $*

Code:
./hlds_i686 $*

Code:
./hlds_run $*


One of them may work. The reason I am suggesting
this is that I have a similar problem with my BF2
servers. Unless I start them from a wrapper script
(which I want to do anyway since I do some other
stuff before the server is started), they won't work
and I'll get defunct processes. This is all related to
how exec behaves when used to start a script contra
an executable, and how GC starts the top script/exe.
So just try out those four variations and see if one
works for you.

Oh, and make absolutely sure that it is your wrapper
that is called by GC.

When you say wrapper, do you mean the file that is called hlds_i686 & has this stuff in it?
Code:
#!/bin/bash
export LD_LIBRARY_PATH=`pwd`
exec ./hltv_orig $*
Back to top
View user's profile Send private message
Kybber



PostPosted: Thu Feb 22, 2007 11:57 pm    Post subject: Reply with quote

Yes. The point is that you replace the original script
or executable with a script that calls the original.
Hence the new script "wraps" the original.

And you don't _really_ need to quote my entire post
which is right above your reply Wink

Edit: I assume you have mv'd hlds_i686 to hltv_orig
in your above example? You've chosen a strange
name, but that doesn't matter. As long as GC actually
calls your script, you should be fine. But I would
suppose GC calls hlds_run and not hlds_i686. Make
100% certain that is not the case. If it is, then try
to wrap hlds_run instead i hlds_i686.
Back to top
View user's profile Send private message
compuwiz



PostPosted: Fri Feb 23, 2007 3:05 am    Post subject: Reply with quote

i have it called hlds_orig. But if I wrap hlds_run, gc wont exec it, it will try to exec hlds_i686, if i rap hlds_hun to hlds_i686, hlds_run wont be able to work since it would be executing itself.
Back to top
View user's profile Send private message
compuwiz



PostPosted: Fri Feb 23, 2007 3:19 am    Post subject: Reply with quote

With NS it now wants to run hlds_run and it works without any changes. I have no idea what happened.
Back to top
View user's profile Send private message
compuwiz



PostPosted: Fri Feb 23, 2007 5:54 am    Post subject: Reply with quote

Whn I try to make a dod server, it uses hlds_i686. I cant have both work at the same time, i guess.
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Fri Feb 23, 2007 8:22 am    Post subject: Reply with quote

It should have been using hlds_run - I've made DoD run with hlds_run, can you see how that looks now please?
Back to top
View user's profile Send private message
compuwiz



PostPosted: Fri Feb 23, 2007 8:49 am    Post subject: Reply with quote

It still wont start, and it days this in gc.
Code:
Command Line:   hlds_i686 -game dod -console +ip *********** +port 27015 +maxplayers 32 +servercfgfile port27015.cfg +exec port27015.cfg +map dod_avalanche -sport 27035
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Fri Feb 23, 2007 9:19 am    Post subject: Reply with quote

Try now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic All times are GMT + 10 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum powered by phpBB © 2001, 2005 phpBB Group
GameCreate Service Terms | Privacy Policy | © Copyright Mammoth Media 2001-2007
GameCreate™ is a trademark of Mammoth Media Pty Ltd. GameCreate® is a registered trademark in Australia.