Jump to content
GIGN Forum

-=[pamācība]=- Hltv Demo


Recommended Posts

Šī pamācība ir domāta, lai HLTV *.dem failus var novilkt no tavas web lapeles. smile.gif

Tātad..

Ejam uz savu CS direktoriju..

Atveram vaļā failu hltv.cfg

Ierakstām:

connect "tava servera IP"

name "HLTV vārds"

record "../../../../../Web/www/demo/"

PS. Ja jums nav šāda direktorija tad nomainām to, bet folderi demo atstājam, velāk varēsi pats izlabot!

hltv.cfg failu veram ciet un saglabājam!

Tālak ej uz sawu www mapīti.

Uztaisam folderi ar nosaukumu "demo"

Palaižam "hltv.exe" kurš atrodas tajā paša vietā kur hltv.cfg

Ja vis izdodās un parādas uzraksts ka *.dem fails rakstās, tad hltv.exe konsolē ierakstām stop.

Tad atkal ejam uz www mapīti, kur būs jūsu uztaisītais "demo" folderis, atveram viņu, un pārbaudam vai *.dem fails tur ir, ja ir tad vis ir chikiniekā.

Pēctam uztaisat failu "demo.php" Kurā ierakstiet sekojošo:

<?php

if ($handle = opendir('C:/Web/www/demo/')) {

while (false !== ($file = readdir($handle))) {

if (strlen($file) > 4)

{

$gabali = explode("-", $file);

$date = $gabali[1];

$mape = $gabali[2];

$mapesgabali = explode(".", $mape);

$name = $mapesgabali[0];

$year = substr($date,0,2);

$month = substr($date,2,2);

$day = substr($date,4,2);

$hour = substr($date,6,2);

$minute = substr($date,8,2);

echo "<center> $day.$month.$year             $hour:$minute             $name            

<a href=\"demo/$file\">Novilkt</a></br></center>";

}

}

closedir($handle);

}

?>

Veram ciet un saglabājam!

Tad ejam uz šejieni, un pārbaudam, vai ir iespējams novilkt, *.dem failu, ja visu izdarījāt pareizi, tad visam vajadzētu iet! smile.gif

Noteikti esam ievērojuši ka iskats ir šausmīgi biedējoš!

Tāpēc šo te kodu:

<?php

if ($handle = opendir('C:/Web/www/demo/')) {

while (false !== ($file = readdir($handle))) {

if (strlen($file) > 4)

{

$gabali = explode("-", $file);

$date = $gabali[1];

$mape = $gabali[2];

$mapesgabali = explode(".", $mape);

$name = $mapesgabali[0];

$year = substr($date,0,2);

$month = substr($date,2,2);

$day = substr($date,4,2);

$hour = substr($date,6,2);

$minute = substr($date,8,2);

echo "<center> $day.$month.$year             $hour:$minute             $name            

<a href=\"demo/$file\">Novilkt</a></br></center>";

}

}

closedir($handle);

}

?>

ierakstām savā "index.php" vai kādā citā *.php failā!

Tas nu takā būtu vis!

P.S. Ja kkas nesanāk tad ejam uz šejieni

P.P.S Ja ir kkādas problēmas tad rakstat! thumbsup.gif

? jancis38 // All rights reserved.

XD.gif

Edited by jancis38
Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

a var kautka to fii4u uztaisit kad nu piemeram uz kkadu times.lv vai kko citu visu sataisa un viss lai iet es zinu ka times vieta nebuus bet sitads butu pietiekams

SendOver

File Size Limit: 2GB

Download Limit: Unlimited

File Life: 7 Days (Deleted only if there is no download activity in 7 days)

Link to comment
Share on other sites

a var kautka to fii4u uztaisit kad nu piemeram uz kkadu times.lv vai kko citu visu sataisa un viss lai iet es zinu ka times vieta nebuus bet sitads butu pietiekams

SendOver

File Size Limit: 2GB

Download Limit: Unlimited

File Life: 7 Days (Deleted only if there is no download activity in 7 days)

Var mēģināt, bet baigi jačakarejas! :/ Un šitādā veidā ieksh times.lv man liekas ka nevar. unsure.gif

Link to comment
Share on other sites

a kur tiesi

connect "tava servera IP"
name "HLTV vārds"
record "../../../../../Web/www/demo/"

sitais jaaraksta????

mans hltv.cfg izskataas saadi

// HLTV Proxy configuration file

// HLTV proxy runs this file on start up
// This file should only be edited if you want to broadcast a game

// set HLTV proxy name as shown in score board
name "HLTV Proxy"

// set HLTV name, how it should appear in game server browsers
// hostname  	"My HLTV Proxy"

// set offline info text clients will see as reject reason if HLTV isn't broadcasting yet
offlinetext "Sorry, game is delayed. Please try again later."

// delays broadcasting for 30 seconds
delay 30.0

// allow 3.5 KByte/sec as client rate. This is good a value
// for internet broadcasts. On LAN you may set this value to 10000
maxrate 3500

// log HLTV console in proxy.log 
// logfile 1  

// local chatting for HLTV spectators enabled
chatmode 1

// if game server is password protected, enable this line
// serverpassword	"mypassword"

// proxy's adim password for rcon, commentator etc.
// adminpassword	"mypassword"

// show message for 5 seconds each 60 seconds in center of X axis (-1) and
// above help text bar (0.85). Color given as hexadecimal RGBA .
loopcmd 1 60 localmsg "You're watching HLTV. Visit www.valvesoftware.com" 5 -1 0.85 FFA000FF

// hltv.tga will be shown instead of the default HLTV logo in spectator GUI
// bannerfile "hltv.tga"

// these commands will be executed on connecting spectator client and may be used
// to adjust settings for HLTV (for example voice parameters)
signoncommands "voice_scale 2; voice_overdrive 16; volume 0.5; echo Voice adjusted for HLTV"


echo hltv.cfg loaded.

Edited by novijas
Link to comment
Share on other sites

? lai sazipojas:

<?php

if ($handle = opendir('C:/Web/www/demo/')) {

while (false !== ($file = readdir($handle))) {

if (strlen($file) > 4)

{

$gabali = explode("-", $file);

$date = $gabali[1];

$mape = $gabali[2];

$mapesgabali = explode(".", $mape);

$name = $mapesgabali[0];

$year = substr($date,0,2);

$month = substr($date,2,2);

$day = substr($date,4,2);

$hour = substr($date,6,2);

$minute = substr($date,8,2);

echo "<center> $day.$month.$year             $hour:$minute             $name            

<a href=\"demo/$file\">Novilkt</a></br></center>";

}

}

closedir($handle);

}

?>

<?php

function zipcompressfile($source,$destination,$filename,$level=false)

  {

      $dest=$destination.$filename.'.zip';

      $mode='wb'.$level;

      $error=false;

      if($fp_out=gzopen($dest,$mode))

      {

          if($fp_in=fopen($source.$filename,'rb'))

          {

              while(!feof($fp_in))

              {

                  gzwrite($fp_out,fread($fp_in,1024*512));

              }

              fclose($fp_in);

          }

          else

          {

              $error=true;

                        }

          gzclose($fp_out);

      }

      else $error=true;

      if($error) return false;

      else return $dest;

  }

  $demo_dir = 'C:/Web/www/demo2/'; // Folder with .dem files

  $dl_dir = 'C:/Web/www/demo/'; // Folder, where to put compressed files

  $handle = opendir($demo_dir); 

  if ($handle)

  {

      while (false !== ($fails = readdir($handle)))

      {

          if ( preg_match("/(.*).dem/", $fails, $demo) )

          {

              zipcompressfile($demo_dir, $dl_dir, $fails);

        } 

  }

      closedir($handle); 

      }

?>

? Apmainam hltc.cfg uz šito:

connect "tava servera IP"

name "HLTV vārds"

record "../../../../../Web/www/demo2/"

? Iekš www mapītē uztaisam jaunu mapīti demo2

Tad pārbaudām, vai *.dem faili rakstās iekš folderī demo2, ja vis ir kārtībā, tad ejam uz savu HLTV Demo sadaļu, un ja visu izdarījāt pareizi, tad turpmākie dem faili būs iekš *.zip smile.gif

Edited by jancis38
Link to comment
Share on other sites

? lai sazipojas:

? Apmainam hltc.cfg uz šito:

? Iekš www mapītē uztaisam jaunu mapīti demo2

Tad pārbaudām, vai *.dem faili rakstās iekš folderī demo2, ja vis ir kārtībā, tad ejam uz savu HLTV Demo sadaļu, un ja visu izdarījāt pareizi, tad turpmākie dem faili būs iekš *.zip smile.gif

Kad es spiežu Novilkt, man ieet tajā pašā lapā, bet palielinās par vienu demo, nu nemāku to paskaidrot, screen zemāk.

post-2-1174817108.jpg

Link to comment
Share on other sites

  • 2 months later...

Man viss iet :thumbsup:

šeit es rakstiju šādi

<?php
if ($handle = opendir('C:/wamp/www/demo/')) {
while (false !== ($file = readdir($handle))) {
if (strlen($file) > 4)
{
$gabali = explode("-", $file);
$date = $gabali[1];
$mape = $gabali[2];
$mapesgabali = explode(".", $mape);
$name = $mapesgabali[0];
$year = substr($date,0,2);
$month = substr($date,2,2);
$day = substr($date,4,2);
$hour = substr($date,6,2);
$minute = substr($date,8,2);
echo "<center> $day.$month.$year             $hour:$minute             $name            
<a href=\"http://manaadrese/demo/$file\">Novilkt</a></br></center>";
}
}
closedir($handle);
}
?>

newis šadi

<?php
if ($handle = opendir('C:/Web/www/demo/')) {
while (false !== ($file = readdir($handle))) {
if (strlen($file) > 4)
{
$gabali = explode("-", $file);
$date = $gabali[1];
$mape = $gabali[2];
$mapesgabali = explode(".", $mape);
$name = $mapesgabali[0];
$year = substr($date,0,2);
$month = substr($date,2,2);
$day = substr($date,4,2);
$hour = substr($date,6,2);
$minute = substr($date,8,2);
echo "<center> $day.$month.$year             $hour:$minute             $name            
<a href=\"demo/$file\">Novilkt</a></br></center>";
}
}
closedir($handle);
}
?>

Un man viss ir ok!! :thumbsup:

Edited by ashais13
Link to comment
Share on other sites

  • 1 month later...
demo mapiitee tas fails?? :unsure:

Un tur ir rakstiits ka nevar atveert kkaadu director.cfg

Plz help

post-11420-1183298665_thumb.jpg

man ta liekas uztaisi www mape demo mapi un tad shito ieraksti hltv.cfg:

record "../../../../../AppServ/www/demo/"

un tad vis strada :)

Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...