Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 43

167.86.x.x dilbertplus
173.212.x.x forum
216.244.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x user
46.229.x.x forum
46.4.x.x dilbertplus
5.255.x.x forum
54.235.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x lgsl
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
66.249.x.x forum
66.249.x.x forum

Last Seen

4Rsercom Thu 21:49
Apophis01 Fri 10:15
Bommel Wed 09:39
frob Sat 21:14
ODDBALL118 Fri 17:07

Newest Members

Forums
vsemteam
Fri Mar 15 2013, 01:58PM
Posts: 2
Joined: Fri Mar 15 2013, 01:43PM
Registered Member #7592
Hello! In LGSL old infa the server Teeworlds.
In the new version over the flow of data, so the curve shows the statistics. Who has the new version?

That's old.

<?php  
function lgsl_query_21(&$server, &$lgsl_need, &$lgsl_fp
  { 
//---------------------------------------------------------+ 

    
fwrite($lgsl_fp,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffgief"); 

    
$buffer fread($lgsl_fp4096); 
    
$buffer substr($buffer20); // REMOVE HEADER 

    
if (!$buffer) { return FALSE; } 

//---------------------------------------------------------+ 

    
$server['s']['name']       = lgsl_cut_string($buffer); 
    
$server['s']['map']        = lgsl_cut_string($buffer); 
    
$server['e']['gamemode']   = lgsl_cut_string($buffer); 
    
$server['s']['password']   = lgsl_cut_string($buffer); 
    
$server['e']['progress']   = lgsl_cut_string($buffer)."%"
    
$server['s']['players']    = lgsl_cut_string($buffer); 
    
$server['s']['playersmax'] = lgsl_cut_string($buffer); 

    switch (
$server['e']['gamemode']) 
    { 
      case 
0$server['e']['gamemode'] = "Deathmatch"; break; 
      case 
1$server['e']['gamemode'] = "Team Deathmatch"; break; 
      case 
2$server['e']['gamemode'] = "Capture The Flag"; break; 
    } 

//---------------------------------------------------------+ 

    
$player_key 0

    while (
$buffer
    { 
      
$server['p'][$player_key]['name']  = lgsl_cut_string($buffer); 
      
$server['p'][$player_key]['score'] = lgsl_cut_string($buffer); 

      
$player_key ++; 
    } 

//---------------------------------------------------------+ 

    
return TRUE
  } 
?>



Here's a new kind of query, but how to implement in LGSL, did not understand ...
<?php 
function get_tw_server_0_6($server) { 
  
  
$socket stream_socket_client('udp://'.$server $errno$errstr1); 
  
fwrite($socket"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x69\x65\x33\x05"); 
  
$response fread($socket2048); 
  
  
//  echo str_replace("\x00"," <br/> ",$response); 
  
  
if ($response){ 
    
$info explode("\x00",$response); 
  
    
$players = array(); 
    for (
$i 0$i <= $info[8]*5-$i += 5) { 
    
      
$teams = Array("Наблюдает","В игре"); 
      
$team $teams[$info[$i+14]]; 
    
      
$flags = Array(); 
    
      
$flags[] = Array("default""-1"); 
      
$flags[] = Array("XEN""901"); 
      
$flags[] = Array("XNI""902"); 
      
$flags[] = Array("XSC""903"); 
      
$flags[] = Array("XWA""904"); 
      
$flags[] = Array("AR""32"); 
      
$flags[] = Array("AU""36"); 
      
$flags[] = Array("AT""40"); 
      
$flags[] = Array("BY""112"); 
      
$flags[] = Array("BE""56"); 
      
$flags[] = Array("BR""76"); 
      
$flags[] = Array("BG""100"); 
      
$flags[] = Array("CA""124"); 
      
$flags[] = Array("CL""152"); 
      
$flags[] = Array("CN""156"); 
      
$flags[] = Array("CO""170"); 
      
$flags[] = Array("HR""191"); 
      
$flags[] = Array("CZ""203"); 
      
$flags[] = Array("DK""208"); 
      
$flags[] = Array("EG""818"); 
      
$flags[] = Array("SV""222"); 
      
$flags[] = Array("EE""233"); 
      
$flags[] = Array("FI""246"); 
      
$flags[] = Array("FR""250"); 
      
$flags[] = Array("DE""276"); 
      
$flags[] = Array("GR""300"); 
      
$flags[] = Array("HU""348"); 
      
$flags[] = Array("IN""356"); 
      
$flags[] = Array("ID""360"); 
      
$flags[] = Array("IR""364"); 
      
$flags[] = Array("IL""376"); 
      
$flags[] = Array("IT""380"); 
      
$flags[] = Array("KZ""398"); 
      
$flags[] = Array("LV""428"); 
      
$flags[] = Array("LT""440"); 
      
$flags[] = Array("LU""442"); 
      
$flags[] = Array("MX""484"); 
      
$flags[] = Array("NL""528"); 
      
$flags[] = Array("NO""578"); 
      
$flags[] = Array("PK""586"); 
      
$flags[] = Array("PH""608"); 
      
$flags[] = Array("PL""616"); 
      
$flags[] = Array("PT""620"); 
      
$flags[] = Array("RO""642"); 
      
$flags[] = Array("RU""643"); 
      
$flags[] = Array("SA""682"); 
      
$flags[] = Array("RS""688"); 
      
$flags[] = Array("SK""703"); 
      
$flags[] = Array("ZA""710"); 
      
$flags[] = Array("ES""724"); 
      
$flags[] = Array("SE""752"); 
      
$flags[] = Array("CH""756"); 
      
$flags[] = Array("TR""792"); 
      
$flags[] = Array("UA""804"); 
      
$flags[] = Array("GB""826"); 
      
$flags[] = Array("US""840"); 
  
      
$flag ""
    
      foreach (
$flags as $flag_tmp
      { 
        if(
$flag_tmp[1] == $info[$i+12]) 
        { 
          
$flag $flag_tmp[0]; 
        } 
      } 
    
  
      
$players[] = array( 
            
"name" => htmlentities($info[$i+10], ENT_QUOTES"UTF-8"), 
            
"clan" => htmlentities($info[$i+11], ENT_QUOTES"UTF-8"), 
            
"flag" => $flag
            
"score" => $info[$i+13], 
            
"team" => $team); 
    } 
  
    if(
$info[9] == $info[7]) 
    { 
      
$specslots $info[9]; 
    }else{ 
      
$specslots $info[9] - $info[7]; 
    } 
    
$tmp = array( 
    
"name" => $info[2], 
    
"map" => $info[3], 
    
"type" => $info[4], 
    
"flags" => $info[5], 
    
"player_count_ingame" => $info[6], 
    
"max_players_ingame" => $info[7], 
    
"player_count_spectator" => $info[8] - $info[6], 
    
"max_players_spectator" => $specslots
    
"player_count_all" => $info[8], 
    
"max_players_all" => $info[9], 
    
"players" => $players); 
  
    return 
$tmp
  
  } else { 
    return 
FALSE
  } 

?>
Website
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org