The online racing simulator
Searching in All forums
(96 results)
D34N0
S3 licensed
:iagree:

I've been playing LFS for 18 months and still leaning but thats a good thing.. Practice is the main thing and lots of it, but when you find that sweet lap it's a great feeling. The best way is to start with the slower cars and get a feel for the handling then work your way up the cars.. That way you will appreciate how to handle and drive the faster cars.

But most of all Enjoy the racing, stay clean, have fun and you will get a sense of satisfaction from the game.

Have Fun
Dean
D34N0
S3 licensed
Quote from smith :D34N0, quick googling reveals many people with win9x encountering this error. I'll try to find more information and fix it, but you really should upgrade to something newer
edit: looks like this problem is specific to win98se only... win98 and winme should work.

Thanks, I know I should upgrade but this is just an old box at work I use for running stats, I'll look into possibility of putting Win2000 on it

Dean
D34N0
S3 licensed
Hi Smith,

I have a problem running version 1.3 and 1.299 on my Microsnot Windows 98 machine, it is fully patched and /insim 65000 has been run in LFS p9.

When starting stats.exe "InsimInit 64999" appears in the lfs window then the following is displayed in the command window.

LFS stats! v1.3 (c) 2004-2005 Alexander 'smith' Rudakov ([email protected])
Connecting [127.0.0.1 65000 64999 ]
Error connecting to LFS: Sockets error 126

Dean
D34N0
S3 licensed
Quote from Sven Menkhoff :This Script is great.
But i have a lil Problem with it.
I only wanna use the upper part of it, cause the lower part is too wide for our Page.
How can i remove the lower part?

greez S.Menkhoff

Please explain what you mean by upper an lower parts..
The script just creates a table so there is no upper and lower part.. There are 2 options at the bottom to display either a expandable or fixed table? (as listed below), to comment out either of the rows as described in the comments place // at the start of the line you do not want

//*************************************************
// Comment and Uncomment the type of table you want
//*************************************************
display_expandable_table($TeamMembers, $LfsUsers, $InGameName);
display_fixed_table($TeamMembers, $LfsUsers, $InGameName);

Regards
Dean
D34N0
S3 licensed
The code has once again been updated.

1) Fixed an error in the Host Name Colour conversion that caused text following the table to be the incorrect colour. Thanks to Tristancliffe for spotting that one.

2) Added second array to contain the In Game Name or name you wish to show in the table in the letter case you type, but must be in the same sequence as the Team Members array. Thanks to Tristancliffe for that idea.

3) Added a link to refresh the screen if hosts file not found. Thanks to Tristancliffe for the code

Dean


<?php 

//******************************************
// Add Team Member names to$TeamMembers
// LFS User Name and in lowercase
// Lowercase used to reduce typos
// in the username
//
// Also add the team Members In Game
// Name in $InGameName (any case will do)
// MUST be in the same order as $TeamMembers
//******************************************
$TeamMembers = array("lfs name","lfs name","lfs name","lfs name","lfs name");
$InGameName = array("lfs name","lfs name","lfs name","lfs name","lfs name");
//**********************************
 
// function to safely trim null-terminated strings
// could just use trim () in this example though
function trim_c_string ($string) {
    
$new "";
    
$len strlen ($string);
    for (
$x=0$x<$len$x++) {
        if (
$string[$x] != "\0"$new .= $string[$x];
        else break;
    }
    return 
$new;
}
 
// Function to remove the colour code data from a string
function remove_colour_codes($String){
$ColCodes = array("^0","^1","^2","^3","^4","^5","^6","^7","^8","^9");
$NewString str_replace($ColCodes"",$String);
return 
$NewString;
}
 
// Function used by format_host_colours function to display correct colour value in html format
function get_colour($ColourNum){
switch (
$ColourNum) {
case 
"0";
     
$ColourName "#000000"//Black
     
break;
case 
"1";
     
$ColourName "#FF0000"//Red
     
break;
case 
"2";
     
$ColourName "#00FF00"//Pastel Green
     
break;
case 
"3";
     
$ColourName "#FFFF00"//Yellow
     
break;
case 
"4";
     
$ColourName "#0000FF"//Light Blue
     
break;
case 
"5";
     
$ColourName "#FF0080"//Light Purple
     
break;
case 
"6";
     
$ColourName "#00FFFF"//Turquoise
     
break;
case 
"7";
     
// Remove comment marks on next line if not a white background
     //$ColourName = "#FFFFFF";    //White
     // Add Comment marks to next line if not a white background
     
$ColourName "#808080";    //Dark Grey
     
break;
case 
"8";
     
$ColourName "#00FF00"//Pastel Green
     
break;
}
return 
$ColourName;
}
 
// Function to replace the ^x codes in the Host name to show correct colours on the screen
function format_host_colours($HostName){
for(
$i 0$i strlen($HostName); $i++){
    if(
substr($HostName$i1) == "^"){
     
$CharPos strpos($HostName"^"$i);
     
$ColNum substr($HostNamestrpos($HostName"^"$i) + 1,1);
     
$ColourString get_colour(substr($HostNamestrpos($HostName"^"$i) + 1,1));
     if(
$i == "0"){
        
// If ^ found at the start of the host string remove the ^[num]
        
$TmpString substr($HostName,$i+2);
        
// Add the html font code to the start of the string and append the
        // variable $TmpString with the ^[num] removed
        
$HostName "<font color='$ColourString'>".$TmpString;
     }
     else{
        
// Get the left part of the string to the next ^[num]
        
$LTmpString substr($HostName,0,$i);
        
// Get the right part of the string after the ^[num]
        
$RTmpString substr($HostName,$i+2);
        
// Add the html close font and add the new html colour to the end of the
        // Left part of the string then add the right part of the string
        
$HostName $LTmpString."</font><font color='$ColourString'>".$RTmpString;
     }
    }
}
// Close any html font tag left open in the above
$HostName $HostName."</font>";
Return 
$HostName;
}
 
// Function to display Team Members online in a dynamic table
function display_expandable_table($TeamMembers$LfsUsers$InGameName){
// Set the variable to count the members online
$MembersOnline 0;
// Count the number of members
$TotalMembers count($TeamMembers);
// Create Header row for the table
echo "<tr bgcolor='#CCCCCC' align='center'><th>Team Racer</th><th>On Server</th></tr>";
// search through the file for Team Members and add a row to the
// table showing the name and server they are on
foreach ($LfsUsers as $LfsUser => $LfsHost) {
    for(
$i 0$i $TotalMembers$i++){
     if(
strtolower($LfsUser) == $TeamMembers[$i]){
        
$LfsUser remove_colour_codes($LfsUser);
        
$LfsHost format_host_colours($LfsHost);
        echo 
"<tr bgcolor='#FFFFFF'>";
        echo 
"<td>$InGameName[$i]</td>";
        echo
"<td>$LfsHost</td></tr>";
        
$MembersOnline =+ 1;
     }
    }
}
// Display this row only if no members are online
if($MembersOnline == 0){
    echo 
"<tr bgcolor='#FFFFFF' align='center'><td>No Members</td><td>Are Online</td></tr>";
}
}
 
// Function to display all Team Member Status
function display_fixed_table($TeamMembers$LfsUsers$InGameName){
/// Count the number of members
$TotalMembers count($TeamMembers);
// Create Header row for the table
echo "<tr bgcolor='#CCCCCC' align='center'><th>Team Racer</th><th>Status</th><th>On Server</th></tr>";
for(
$i 0$i $TotalMembers$i++){
    echo 
"<tr bgcolor='#FFFFFF'>";
    foreach (
$LfsUsers as $LfsUser => $LfsHost) {
     if(
strtolower($LfsUser) == $TeamMembers[$i]){
        
$LfsHost format_host_colours($LfsHost);
        echo 
"<td>$InGameName[$i]</td>";
        echo 
"<td>Online</td>";
        echo
"<td>$LfsHost</td></tr>";
        
$Found "True";
        break;
     }
     else{
        
$Found "False";
     }
    }
     if(
$Found == "False"){
        echo 
"<td>$InGameName[$i]</td>";
        echo 
"<td>Offline</td>";
        echo
"<td>&nbsp</td></tr>";
     }
}
}
 
// init some vars
$LfsUsers = array ();
$x 0;
$LfsHostList "";
// get the hostlist
$LfsHostList file_get_contents ("http://lfsworld.net/pubstat/get_stat2.php?action=hosts");
$len strlen ($LfsHostList);
// Thanks to Tristiancliffe for this line. It is a refresh link
if ($len 52) exit ("<a href='javascript:document.location.reload();'>Couldn't get hostlist. Click to retry...</a>");
 
// parse the data
while ($x $len) {
    
$LfsHostName "";
    
$nr_racers 0;
    for (
$y=0$y<32$y++) $LfsHostName .= $LfsHostList[$x++];
    
$LfsHostName trim_c_string ($LfsHostName);
    
$x += 20// skip some host-data
    
$nr_racers ord ($LfsHostList[$x++]);
    for (
$w=0$w<$nr_racers$w++) {
        
$LfsUserName "";
        for (
$y=0$y<24$y++) $LfsUserName .= $LfsHostList[$x++];
        
$LfsUsers[trim_c_string ($LfsUserName)] = $LfsHostName;
    }
}
 
// Create table to hold data
echo "<center><br>";
echo 
"<table border='1' bordercolor='C0C0C0' cellpadding='4' cellspacing='0' style='border-collapse: collapse' style='font-family: Verdana; font-size: 10pt'>";
 
//*************************************************
// Comment and Uncomment the type of table you want
//*************************************************
display_expandable_table($TeamMembers$LfsUsers$InGameName);
display_fixed_table($TeamMembers$LfsUsers$InGameName);
/* Close the table */
echo "</table></center><br>";

?>

Note : 4/11/05 18:18GMT For those who have already downloaded this code today there was a small error inside one of the functions, you may need to download it again. Inside one of the functions [$i] was missing from $InGameName when writing the data into the table. Corrected in the above code. Sorry
Last edited by D34N0, .
D34N0
S3 licensed
I have updated the code to show the server name in the correct colours (except white which is set to dark grey as it shows better on a white background ).

The team Members are now entered into an array at the beginning of the code, use lowercase in the array as this helps to minimise the chances of mistyping the name. If you want to use the name in the correct case you will need to remove strtolower used in the display table functions. At the end are two lines that allow you to display the online status in an expandable table with columns Name and Server or a fixed table showing all team members with the columns Name, Status and Server. Comment out the one you do not want to use.

Hope this will be of use.

Dean

Note : The code has been updated and is in the message below
Last edited by D34N0, .
D34N0
S3 licensed
This is a link to the function file_get_contents http://uk2.php.net/manual/en/function.file-get-contents.php

It is only available in PHP 4 >= 4.3.0, PHP 5 as stated in the above link.

Heres a link to the PHP Quick Manual Reference http://www.php.net/quickref.php

Also if learning PHP I found the tutorials on this site very helpful http://www.tizag.com they gave me a good understanding and it's just the tip of the iceberg
Last edited by D34N0, .
D34N0
S3 licensed
Quote from tristancliffe :Great. Another milestone in LFS's history - proper multiple language support. I'm d/ling it now, even if I stand little to gain from it (partly to help bug test, and partly cos it makes me feel good having the latest version!)

:iagree:
D34N0
S3 licensed
:doh: I should have said to put the "team member LFS Name": in lower case.

The reason for using strtolower in the switch statement was to try and stop any mistyping of Upper and Lowercase characters in the LFS Name. The ouput though is in the case as defined in the data file.

Dean
D34N0
S3 licensed
Thanks for the php code Victor it works a treat.

I have amended the variable names as one or two conflicted with variables aready used in my code. I have added a function to remove the colour code data and created a formatted table that will fill with team members if they are listed in the data file.

I hope this will be of some use to someone.

Dean

Note : New code below
Last edited by D34N0, .
D34N0
S3 licensed
Have you copied the .tsf files from the directory you installed AnalyzeForSpeed in to data/smx?
D34N0
S3 licensed
DFP RevB00 here.
D34N0
S3 licensed
I found the best one to use out of them is Analyze For Speed it also has a 3D chase mode by pressing the Letter T.
D34N0
S3 licensed
Would all those who agree with disabling the reset then surely your also for disabling the ability to go directly to the pits during league races.

If so then please add your support to the following thread http://www.lfsforum.net/showthread.php?t=434

Thanks
D34N0
S3 licensed
Yes only after the replay is watched and with the races getting longer and more cars on the grid thats gonna take up alot more time.

If you go directly to the pits your laps are rest to 0 and you are able to rejoin the race. What I am saying is that this option should not be available during league racing (an option that can be switched on/off at the server by the admins), therfore avoiding any confusion on any rules and ellimiating any possiblility of the racer re joining causing any damage to others. Surely they should go round to the pits off the racing line and complete a proper pit stop, this option is a get out of jail free card especially on first lap incidents and could be classed as cheating.
D34N0
S3 licensed
These administrative options of stopping the ability to go directly to the garage are really meant for league races.

If someone does this and returns to the race they could cause incidents that they should not have been involved in in the first place and it's not fair for those who genuinely make a pit stop to repair damage.

I would like to know what the Dev's views are on this.
D34N0
S3 licensed
Keeping the faith
D34N0
S3 licensed
I have just recently changed from a MS Sidewinder FF (USB) wheel to a DFP. Wow what a change It will take a little while to get used to, meaning learning to turn the wheel more but makes the feel of the car better.

I'm not sure of the PS2 - Xbox difference but the one people talk about is the PS2 version.

Yes it says for a PS2 but it is a USB connection and all you need to do is download the Beta 4.60 drivers from http://www.wingmanteam.com It was installed and running in 5 mins

I got mine from (its the RevB00 pedals) http://www.gameseek.co.uk/productdetail/PS2c4zcf9z58c0na5rz/

I think it you will find it worth the change.
D34N0
S3 licensed
Smith - Thanks for the quick reply. It was more of a hopeful suggestion and yes I do agree it should an administrative task and thats why I also raised this thread in the improvements section


http://www.lfsforum.net/showthread.php?t=434
D34N0
S3 licensed
Smith - Are you able to determine if a valid pit stop has taken place or the person has gone straight to the garage and out (I know doing this resets the laps to 0) as it would be nice if Stats was able to detect this then placing the person as a DNF at the bottom with 0 laps completed.

The reason I am asking is during a league race someone sustained damage then immediately went to the garage came out and completed the race. And was fewer laps down than others who had made legitamate pit stops. This was found out after watching the replay and amending the stats page

I have also added a post in the improvement section asking for the Shift+S and Pits options be allowed to be switched off so there is no going to the garage during a race just pit stopping.

Regards
Dean
No Instant Return To Garage During Race
D34N0
S3 licensed
Whilst driving in a league race it was noticed that a couple of drivers sustained damaged and instead of driving to the pits they must have either pressed Shift+S or gone to options and selected Pits to return them to the garage. They then returned to the race and finished x laps down, this is not fair on the other players who actually got to the pits to get fixed, and may have been more laps down.

Is it possible to have an option on the server that stops drivers going direct to the garage during a race, they must either complete a proper pit stop are if unable to make it to the pits spectate. This would be most helpful to All leagues.

Thanks
FGED GREDG RDFGDR GSFDG