Monthly Target: $400 Donations: $348
 87%   Almost there!

Script to start HLTV


Post New Thread Reply   
 
Thread Tools Display Modes
ghostofmybrain
Veteran Member
Join Date: Mar 2010
Old 03-25-2012 , 20:23   Re: Script to start HLTV
Reply With Quote #21

Yeah, that's fine. I appreciate any help I can get, slow or fast.
__________________
Boycott ESEA
My servers
ghostofmybrain is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 03-30-2012 , 23:51   Re: Script to start HLTV
Reply With Quote #22

Are you even able to launch hltv on Linux? Last time I checked, valve broke hltv
Mlk27 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-31-2012 , 01:23   Re: Script to start HLTV
Reply With Quote #23

Quote:
Originally Posted by Mlk27 View Post
Are you even able to launch hltv on Linux? Last time I checked, valve broke hltv
It works just fine [on linux].
__________________
fysiks is offline
ghostofmybrain
Veteran Member
Join Date: Mar 2010
Old 03-31-2012 , 10:22   Re: Script to start HLTV
Reply With Quote #24

Indeed. I've been running about five HLTVs non-stop for almost a year on CentOS.
__________________
Boycott ESEA
My servers
ghostofmybrain is offline
8088
Veteran Member
Join Date: Jan 2008
Old 04-01-2012 , 21:31   Re: Script to start HLTV
Reply With Quote #25

It's nearly finished, but I was wondering about naming the demo files. Would something like demo_[timestamp].dem do?
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-02-2012 , 01:28   Re: Script to start HLTV
Reply With Quote #26

Quote:
Originally Posted by 8088 View Post
It's nearly finished, but I was wondering about naming the demo files. Would something like demo_[timestamp].dem do?
HLTV adds a timestamp and mapname automatically. E.g.

Code:
record demoname
Recording initialized.
Start recording to demoname-1204020027-dod_kalt.dem.
But, you could put whatever you want in "demoname" of course. I'm guessing it's probably only limited by the filesystem as I've just test with 40 characters in "demoname".
__________________

Last edited by fysiks; 04-02-2012 at 01:34.
fysiks is offline
8088
Veteran Member
Join Date: Jan 2008
Old 04-02-2012 , 10:01   Re: Script to start HLTV
Reply With Quote #27

Ok, thanks for testing. I'll set a default value then, which optionally can be overridden.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
ghostofmybrain
Veteran Member
Join Date: Mar 2010
Old 04-02-2012 , 11:24   Re: Script to start HLTV
Reply With Quote #28

Thanks for clarifying that fysiks. I didn't see the thread before I went to bed last night.
__________________
Boycott ESEA
My servers
ghostofmybrain is offline
Mlk27
Veteran Member
Join Date: May 2008
Old 04-05-2012 , 11:21   Re: Script to start HLTV
Reply With Quote #29

Quote:
Originally Posted by fysiks View Post
It works just fine [on linux].
Quote:
Originally Posted by ghostofmybrain View Post
Indeed. I've been running about five HLTVs non-stop for almost a year on CentOS.

That's odd. I'm getting tons of these error messages when I launched it on my Ubuntu server

Code:
$ ./hltv

Console initialized.
FileSystem initialized.
Error:libsteam_api_c.so: cannot open shared object file: No such file or directory
Type 'help' for a list of commands.
WARNING! System::RunFrame: system time difference <= 0.
WARNING! System::RunFrame: system time difference <= 0.
WARNING! System::RunFrame: system time difference <= 0.
WARNING! System::RunFrame: system time difference <= 0.
WARNING! System::RunFrame: system time difference <= 0.
WARNING! System::RunFrame: system time difference <= 0.
WARNING! System::RunFrame: system time difference <= 0.



Edit: Disregard this. Found a fix here

Last edited by Mlk27; 04-05-2012 at 11:29.
Mlk27 is offline
8088
Veteran Member
Join Date: Jan 2008
Old 04-09-2012 , 13:01   Re: Script to start HLTV
Reply With Quote #30

Sorry for the long wait, ghostofmybrain. Although I'm sure things can/should be optimised, I kept things as simple as possible and spend as little time as possible on it ;-)

Requirements:
  • PHP 5.2.8 or higher, with PDO
  • MySQL 5 or higher
Installation:
  1. extract and upload everything to your web space (preferrably into a directory that is password protected)
  2. create a database and import hlds.sql
  3. edit lib/db.php and change the values of $db_host, $db_user, $db_password and $db_database
  4. open index.php in your browser and start adding/editing your servers
  5. edit the path to db.php in cronjob/cronjob.php if you move conjob.php to a different location (recommended, but not required)
  6. create a cronjob to have cronjob/cronjob.php executed at regular intervals:
    1. this requires the path to db.php to be absolute:
      Code:
      php /path/to/cronjob.php
    2. and this allows for a relative path to db.php:
      Code:
      cd /path/to/cronjob.php && php cronjob.php
    3. if you're unsure what your cronjob should look like, upload a seperate .php file with this line:
      PHP Code:
      <?php echo 'cd ' realpath(dirname(__FILE__)) . ' &amp;&amp; php cronjob.php'?>
      open the file in your browser and use the output as your cronjob command
Disclaimer: I've not been able to test every aspect, had a fever, was busy with other stuff, don't know what I'm doing, blah blah unaccountable blah so use at your own risk! And feel free to report bugs (I'm sure there are plenty) here or in a PM.

Credits to xPaw for his fine SourceQuery class.

Here's a demo of the web interface: http://awesomatic.net/hltv/index.php
Attached Files
File Type: zip hltv.zip (19.5 KB, 172 views)
__________________
steamID converter with OpenSearch browser plugin

Last edited by 8088; 05-30-2012 at 14:26. Reason: added 6c
8088 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:02.


Powered by vBulletin®
Copyright ©2000 - 2015, vBulletin Solutions, Inc.
Theme made by Freecode