| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		Kybber
 
 
 
  | 
		
			
				 Posted: Tue Oct 10, 2006 8:38 pm    Post subject: How-to: HLTV | 
				     | 
			 
			
				
  | 
			 
			
				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:
 
 
Insert the following:
 
 	  | Code: | 	 		  #!/bin/bash
 
export LD_LIBRARY_PATH=`pwd`
 
exec ./hltv_orig $* | 	  
 
Make the new file executable:
 
 
 
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 | 
		 | 
	
	
		  | 
	
	
		adbot
 
 
 
  | 
		
			
				 Posted: Thu Mar 31, 2011 3:57 am  | 
				 | 
			 
			
				
  | 
			 
			
				| 
			 |  
		  | 
	
 
 | 
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 11:06 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				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 | 
		 | 
	
	
		  | 
	
	
	
		Kybber
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 11:25 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| Try to remove the "exec" from the wrapper script. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 11:32 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| Still nothing. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 11:49 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| This is becoming to big of a hassle, I think ill just go back to using webmin to start it. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 12:47 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| If I can get it to work, I will use it. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
	
		Kybber
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 10:07 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Try the following variations on the exec-line above:
 
 
 	  | Code: | 	 		  | exec ./hlds_i686 $* | 	  
 
 
 
 
 
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 | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 11:35 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | Kybber wrote: | 	 		  Try the following variations on the exec-line above:
 
 
 	  | Code: | 	 		  | exec ./hlds_i686 $* | 	  
 
 
 
 
 
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 | 
		 | 
	
	
		  | 
	
	
	
		Kybber
 
 
 
  | 
		
			
				 Posted: Thu Feb 22, 2007 11:57 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				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  
 
 
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 | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Fri Feb 23, 2007 3:05 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| 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 | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Fri Feb 23, 2007 3:19 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| With NS it now wants to run hlds_run and it works without any changes. I have no idea what happened. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Fri Feb 23, 2007 5:54 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| 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 | 
		 | 
	
	
		  | 
	
	
	
		Andrew Mammoth
 
 
  | 
		
			
				 Posted: Fri Feb 23, 2007 8:22 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| 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 | 
		 | 
	
	
		  | 
	
	
	
		compuwiz
 
 
 
  | 
		
			
				 Posted: Fri Feb 23, 2007 8:49 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				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 | 
		 | 
	
	
		  | 
	
	
	
		Andrew Mammoth
 
 
  | 
		
			
				 Posted: Fri Feb 23, 2007 9:19 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| Try now. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
	
		 |