Posted: Fri Jul 25, 2008 6:31 pm |
|
first of all Ct's server use the ct+sty version of the game.
some limited documentation of the source code is
here
you may checkout our source code from bazzar found
here
now spawning those zones are a bit tricky
we run a script that looks at ladderlog.txt
you should have LADDERLOG_WRITE_ALL set to 1 so the you can read messages
we set a zombie to each player, at the start of a round we get a list of all the players
if (preg_match("/^ONLINE_PLAYER/", $line)){
$keywords = preg_split("/ /", $line);
//make sure the player is playing
if(sizeof($keywords)==7){
//SPAWN_ZONE zombie <player> <x> <y> <size> <growth> <xdir> <ydir> <interactive> <r> <g> <b> <target_size>
$zombie_spawn.="SPAWN_ZONE zombie ".$keywords[1]." 120 376 1 .001 .5 .5 1 15 00 00 1.5\n";
}
} |
this is we use to print the zombies at the start and then it clears the string
if (preg_match("/^GAME_TIME/", $line)){
$keywords = preg_split("/ /", $line);
$game_time=floor($keywords[1]);
if ( $game_time == -1 ) {
if ($current_map=="loopy_passages") {
print($zombie_spawn);
}
$zombie_spawn="";
}
} |
if you want to have different maps that have zones at the start you may want to put in a common value to replace for the x and y positions in your $zombie_spawn string I'll add this to our wiki later