The online racing simulator
Searching in All forums
(97 results)
emit-nl
S2 licensed
Hi,
I think it would be nice if the !top and !drf windows get a previous/next button.
Would this be easy to realise? I've checked the tops.lpr file, but I don't know where to start (and !near, !drfnear, eg)

Is it possible in the lpr file or only in the hard code of LFSLapper itself? (Cause there is the base of the top command, isn't it?)

Thanks in advance.

Regards,
Tim
Last edited by emit-nl, .
emit-nl
S2 licensed
Hi,
Could anyone confirm if this is a bug or not? Cause then I can be sure it has nothing to do with my LFSLapper script.

Thanks.

Tim
emit-nl
S2 licensed
Quote from Fire_optikz001 :i wanted a point of view on this... i was thinking about adding varying prices on cars and food if you like the idea should they change every
  1. 30 min
  2. Hour
  3. 3 hours
  4. 6 hours
  5. 12 hours
  6. 24 hours
  7. Insim boot

I think this would be a cool feature.
I'm not really sure, but changing every hour would be cool I think.
Else it can also be 3 or six hours.
If you do 12, 24 or every insim boot, then the users may not notice it at all.

What do you think?

I'm going to test your cruise insim today I think

Regards,
Tim
Last edited by emit-nl, .
emit-nl
S2 licensed
Quote from Ziroh :okey.. now i'm confused...
"LFSLapper in Stand By State" What does this mean? :/

Hi,
LFSLapper is started, but it needs to be connected to your server.
Wich directory are you going to use for the server? (default, defaultfiles/workingdir) You can also make a new folder..

Here I'm going to show you how to connect LFSLapper to your own LFS host: (Close lapper first)
  1. Create a new folder or rename the 'default' folder to any name you want. In this case we choose the name: 'TestLapper'. Now open the 'TestLapper' folder.
  2. Rename the default_1.ini file to any name you want .ini. We choose for TestLapper.ini. Now open this file in notepad or any other text editor.
  3. Change yourpassword to your own password.. (hehe!:tilt Save the file and close it.
  4. Open superusers.txt in your text editor, type your LFS username and save it. Do the same with admin.txt.
  5. No go back to the 'bin' folder of LFSLapper and open the file: 'LFSServers.cfg'.
  6. Type in this on a new line; TEST|testlpr|127.0.0.1|29999|./TestLapper|TestLapper.ini|autowork
  7. 29999 is the default insim port for LFS. Set this to the insim port you choose in your lfs host's 'setup.cfg' file.
  8. Instead of 'autowork' you can also choose for 'autoStart' or leave it blank. When you don't choose for autowork, you must type 'start TEST' ('TEST' is the ID of your LFSLapper powered host)
Now start your host and LFSLapper.
Good luck!

Regards,
Tim
emit-nl
S2 licensed
Quote from Krayy :I've been a bit busy at work (promotion, yay!) to do any updates, but this functionality is being addressed in the upcoming gui_user modules. I have ported the who, handicaps and some other stuff the the gui, but have as yet to publish it here. The reason for supplying them as seperate modules, even though the functionality is similar, is to allow for finer detail in what to allow access to from a server admins perspective.

Also helps with ordering them in the admin or user gui lists

Congratiolations with your promotion!!
I'm looking foward to your new release

Tim
Pitwindows
emit-nl
S2 licensed
Hi,

I think there is a bug in the pitwindow function.

I can set the pitwindows in !pwgui and see them in !pitwindow, but in the pitboard there is only: 'No Pitwindow'.
There has got to be information for the laps when the pitwindow starts/stops and how many stops you have made.

I tested it in LFSLapper v6.0.1.1 with default settings.

Is this a bug or is there something I'm doing wrong?

Kind Regards,
Tim

EDIT: I found another bug.
When you type '!mypb' and go to the last page, the button to go to the next page is still there. When you click on it, the following happens (see attachment). When this happens and you click on the previous page button, nothing happens. When you click on the OK button the menu will close, but the previous button stays. When you click the next page button, the first page will open and everything is fine again.

Regards,
Tim
Last edited by emit-nl, . Reason : I meant !mypb instead of !myconfig ^^
emit-nl
S2 licensed
Hi,

I wanted to make an addon for the Admin GUI you made, so the administrators of the server can kick users, ban users with reason and give users penalties.

Yay, I got it! I tried different things, but I'm stuck now.
Could anyone help me with the part of the script where an user will be kicked?
I tried some things, but every time nothing happens or I kick myself instead of any other user.

I attached what I have done so far. (remove .txt) If you can help me with the kick section, then I can finish it on my own I think
In addonsused.lpr, I have this for the GUI.
Never mind the red text

<?php 
########### ##GUI Files #############
# GUI Framework main include - this MUST be first 
include ("./gui.lpr"); 
# Help GUI 
include ("./gui_help.lpr"); # Multi-tabbed help (all in one) 
include ("./gui_help_cruise.lpr"); # Cruise help file (remove if not reqd)

# Admin GUI 
include ("./gui_admin.lpr");    # Admin GUI root include  
include ("./gui_admin_usercontrol.lpr"); #Admin GUI UserControl (kick, ban, penalties)
include ("./gui_admin_membership.lpr");   # Admin GUI Membership administration 
include ("./gui_admin_handicaps.lpr"); # Admin GUI Handicap allocations 
#####################################
?>

Sorry for my bad English, I hope you can understand what I mean.

Thanks in advance.

Kind regards,
Tim

EDIT:
I also changed some things in the 'gui_admin_membership.lpr' and the 'gui_admin_handicaps.lpr' file. Now users that aren't admin can see this windows too, but only admins can change settings. I attached the files to this post. (EDITED_gui_admin_*.lpr.txt ;remove the EDITED_ and .txt again)
There are comments with every thing I changed. I added my username to all comments so you can find all changes I made really fast. You can find all changes quick by searching for 'EMIT-NL'.
If you like the simple changes I've made you can release it. You can edit it if you want and just remove my comments.

Also, what do you think: Should it be cool if the WHO.lpr script is being implemented in your GUI? Otherwise you have diffirent windows instead of one clear page.

Regards,
Tim
Last edited by emit-nl, . Reason : Some changes for the admin GUI
emit-nl
S2 licensed
Quote from sinanju :I struggle on set and get variables, but one way to do it is to have sub-routine to run on connecting [Event OnConnect( $userName )] and/or connect close [Sub OnConnectClose($userName)].

e.g.
SetCurrentPlayerVar( "IdLang",GetStoredValue( $userName . "IdLang" ) );

Then maybe think about setting a default value if no value is loaded
IF ( GetCurrentPlayerVar( "IdLang" ) == "")
THEN
SetCurrentPlayerVar( "IdLang","nl" ); # Set default language to "nl" # dutch
ENDIF

Edit: It does work! Thanks!! This is what I have done:

For all languages AND for the Speed Unit and Show/Hide split info settings I coded like this:

<?php 
Sub SetLang_nl
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","nl");
    
setUserStoredValue("IdLang","nl");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
?>


So the setting will be saved immediately in the 'storedvalue' database after the option is selected. First I had the setUserStoredValue in the OnDisConnect event, but then the data will be lost when Lapper restarts or closes. So I think this is the best option for it

After this, I made LFSLapper load the data when the player joins the server.
Therefor I did this:

<?php 
### Load settings on connect (IdLang, UnitSpeedKmh and ShowSplitPb) ###
CatchEvent OnConnect$userName )
    
$StoredIdLang getUserStoredValue("IdLang");
    
SetCurrentPlayerVar("IdLang",$StoredIdLang);
    
    
$StoredSpeedUnitKmh getUserStoredValue("UnitSpeedKmh");
    
SetCurrentPlayerVar("UnitSpeedKmh",$StoredSpeedUnitKmh);
    
    
$StoredShowSplitPb getUserStoredValue("ShowSplitPb");
    
SetCurrentPlayerVar("ShowSplitPb",$StoredShowSplitPb);
EndCatchEvent
?>


I've also overwritten the !myconfig command, so the settings can't be stored on 2 different places. (cfguser.txt and storedvalue.dbs)

Many thanks, because of you I tried the get/setUserStoredValue variable and now it works!
The !myconfig command now points to my own options menu.

<?php 
        
CASE "!myconfig":
            
DoMenu_Options($KeyFlags,$userName);
            BREAK;
?>

Kind regards,
Tim
Last edited by emit-nl, . Reason : It DOES work!! :)
emit-nl
S2 licensed
Hi,

I have a problem with my script to let users set their own language.
The purpose of the script is the same as in !myconfig, to set the language, but instead of doing this in !myconfig, i want to do this in my own menu.

This is the piece of my script that sets the language:

<?php 
Sub SetLang_en
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","en");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_fr
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","fr");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_nl
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","nl");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_no
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","no");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
?>


When the NL button is pushed, the Sub SetLang_nl will be executed.
The script does it's work and the language is changed to NL.
BUT! When I quit or !reload LFSLapper or when an user rejoins the host, the language is not saved..

When I change the language in !myconfig, I can see it is saved in the cfguser.txt file (lfslapper 'bin' folder). But when I use my own script, the language will be changed for that session, but it isn't saved in the cfguser.txt file.

How can I let my own script work, so the language selection is being saved?

I hope you guys can help me with this
Thanks in advance!

Kind regards,
Tim
emit-nl
S2 licensed
Hi Krayy,

You did a very good job in making this GUI, thank you!

There is only one thing that can be improved, i think.
In the old handicap menu (handicapper.lpr) is a function to save the handicaps in the database and the next time you start lapper, to load the handicaps out of the database.
I think the handicap menu will be complete if you manage to add this function to it!

Very nice job, and if you have any ideas to add, I can help you if you want, 4 hands always type faster then 2 ^^

Kind regards,
Tim

EDIT: I'm now working on the admin GUI to make a page with kick, ban and penalty buttons. How should I call this page?? I have really no idea what is a good name for this page.
Last edited by emit-nl, .
emit-nl
S2 licensed
Thanks! It wasn't working immediately, but after some recoding I managed to do this:


<?php 
Sub DoMenu_Options
($KeyFlags,$userName)

    
openPrivButton"option_lang_bg",83,69,34,16,5,-1,16,"");
    
openPrivButton"option_lang_title",84,69,32,5,5,-1,0,"^7Language");
    
    
$user_lang GetCurrentPlayerVar("IdLang");
    
privMsg("^4Your current language: ".$user_lang);

        IF(
$user_lang == "en")
        
THEN
        privMsg
("Language=English");
        
$btncolor_en "^6";
    ENDIF        
        IF(
$user_lang == "fr")
        
THEN
        privMsg
("Language=French");
        
$btncolor_fr "^6";
    ENDIF        
        IF(
$user_lang == "nl")
        
THEN
        privMsg
("Language=Dutch");
        
$btncolor_nl "^6";
    ENDIF        
        IF(
$user_lang == "no")
        
THEN
        privMsg
("Language=Norvegian");
        
$btncolor_no "^6";
    ENDIF        

    
openPrivButton("option_Lang_en",84,75,16,4,4,-1,32,"^7".$btncolor_en."English",SetLang_en);
    
openPrivButton("option_Lang_fr",100,75,16,4,4,-1,32,"^7".$btncolor_fr."French",SetLang_fr);
    
openPrivButton("option_Lang_nl",84,80,16,4,4,-1,32,"^7".$btncolor_nl."Dutch",SetLang_nl);
    
openPrivButton("option_Lang_no",100,80,16,4,4,-1,32,"^7".$btncolor_no."Norvegian",SetLang_no);
EndSub

Sub SetLang_en
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","en");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_fr
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","fr");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_nl
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","nl");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
Sub SetLang_no
($KeyFlags,$userName)
    
SetCurrentPlayerVar("IdLang","no");
    
DoMenu_Options($KeyFlags,$userName);
EndSub
?>


The reason I made a separate Sub for all languages, is because it didn't worked to have an SetLang("...") in a privButton. I don't know why..

But it works now!
Thanks for the help!

Tim
emit-nl
S2 licensed
Hi,
I have another question.
My registration script to register an account for my website in LFSLapper is almost finished, but now I've got a problem.

If the username is MyName, the function: GetCurrentPlayerVar("UserName"); gives me myname instead of MyName.
Is it possible to keep the capital letters? This would be really great.

Thanks in advance,
Tim

Edit: Ahh I can't get it to work, the Language menu. Could you guys help me with this please?

What I'm trying is to make the current language blue (^6) and the other languages white (^7). This script is inside a Sub.

<?php 
    $btncolor_en 
"^7";
    
$btncolor_fr "^7";
    
$btncolor_nl "^7";
    
$btncolor_no "^7";

    
$user_lang GetCurrentPlayerVar("IdLang");
    IF(
$user_lang == "en")
    
THEN
    $btncolor_en 
"^6";
    ELSEIF(
$user_lang == "fr")
    
$btncolor_fr "^6";
    ELSEIF(
$user_lang == "nl")
    
$btncolor_nl "^6";
    ELSEIF(
$user_lang == "no")
    
$btncolor_no "^6";
    ENDIF

openPrivButton"option_Lang_en",84,75,17,4,4,-1,16,$btncolor_en."English",SetCurrentPlayerVar("IdLang","en"));
?>

Last edited by emit-nl, .
emit-nl
S2 licensed
Quote from Krayy :Just use setplayervar or setcurrentplayver like this:

setcurrentplayervar("idlang", "fr"); # change to french
setcurrentplayervar("idlang", "en"); # change to english

Thanks mate!
Now I can go on with my script

Many thanks,
Bye!

Tim
Language selection
emit-nl
S2 licensed
Hi,
A while ago, Sinanju made a post in the config help. It was about making your own buttons to choose your language of LFSLapper.

Quote from sinanju :I'd like to be able to offer a language choice using buttons as part of my HELP instructions - see attached mock-up.

Apart from using the !myconfig command, which also gives other choices that I don't want to include, is there anyway of doing this?

I´m now busy with making LFSLapper fully graphical and implementing it to my website. It would be great if I can also make an button in my own menu for choosing your language.

Is it possible?

Thanks!

Tim
emit-nl
S2 licensed
I found a little bug a while ago. On the begin of a pitstop the pitwork must be showed, but it isn't. pitWork has to be changed to PitWork. (capital P)

privMsg( langEngine( "%{main_pitwork}%", GetCurrentPlayerVar("pitWork") ) );

must be:

privMsg( langEngine( "%{main_pitwork}%", GetCurrentPlayerVar("PitWork") ) );

Regards
Tim
Last edited by emit-nl, .
emit-nl
S2 licensed
Ok, no problem. Then I'm going to work on the 6.0.0.0 beta b version
Thanks for all the work you did already! And good luck on your job!

Kind Regards,
Tim
emit-nl
S2 licensed
Quote from Gai-Luron :Hello 6.0.0.0 can be considered as stable version.

I'am busy on how to use Grammatical analyser to use with current GLScript Lexer to have an easy way to upgrade and powerfull GLScript.

But you can use 6.0.0.0, it's seem's to e stable


Gai-Luron

Is it better for me to wait with upgrading to 6.0.0.0 beta b, because you are upgrading the GLScript? Or won't there be much changes?
I'm now running LFSLapper 5.9.2.6.
How long do you think it will take before you have finished a new release?

Thanks!
Tim
emit-nl
S2 licensed
Hmm, don't think thats a good solution for me. But I think I leave it this way, because it will only occur in Google Chrome. In any other browser it just works fine!
emit-nl
S2 licensed
Thats great! Thanks!
While implementing the script, I found just one more thing that I'd like to have set:
I set the selected value of 'cars' in the menu.php, to FZR ($cont == 7), but you've got to scroll first in the car select menu till you see that option is selected.
Is it possible to scroll automaticly to that option, or to place the automatic selected function at the top?

EDIT: This does only occur in the browser: 'Chrome'. In IE8 and Firefox it works fine!

Many thanks for this great script.

Tim
Last edited by emit-nl, .
emit-nl
S2 licensed
Thanks, the font size=1 worked!
I decided to get the size as big as possible so I removed the whole size element.
So, my $font now looks like: $font = 'face=Arial'; instead of $font = 'face=Arial size=1';.

After removing this, I added the following to every <table> code:
style='font-size: amount-of-px;
In the case there are 4splits, I chose 11px and for 3splits or any other configurations I chose 12px.

So the text will now be as big as possible for my website template. Thanks for your solution, it helped me very good!
I'm now finishing the script for using in my website.

By the way, I have one more question. Is it possible to remove the AU tracks from menu.php? Cause when you click on it, it says: No Results, though there are values for it in the database. I can get why you've done this, cause the layouts are always diffirent on autocross and they haven't a real value to add it to the script. (Only if someone wants to show the results on his website of a layout he made)
Is it possible to disable the AU tracks from the menu.php? You can see what I mean at: http://www.sinsanity.nl/testt/ ... y.nl/stats/race/index.php

Thanks!

Bye,
Tim
emit-nl
S2 licensed
Quote from michele0676 :Can u post in a zip all the file that u are using and explain again exactly what u want do ?

It's hard to post a zip file, cause there are many files needed for it (stylesheet, header, footer, eg.).
But I think I can explain it some better than I did before.

The idea is to use my own made website template to show the LFSLapperscript.
My website template is 900pixels wide: 650px for the resultspage of lfslapperscript and 250px for the menu of lfslapperscript.
When you edit a filter on the menu, the resultpage will be changed.

In my code I work with divs to place every part of my website. For the menu I used the 'include' code of PHP and for the resultpage I used an 'iframe' with a javascript to stretch the iframe automaticly when it gets bigger.

As you can see, I don't use the index.html, header.html, logo.html and background.jpg.

This is my code:

<?php 
php
$rootfolder 
"../..";
$pagetitle "  -  Statistics: $!N - Demo";
require_once(
"../../styles/layout.inc.php");
echo 
$header;

    <
div id="subnav">
    </
div>
    <
div id="sidebar">
        include 
'menu.php' 
    
</div>
    <
div id="content">
       <
script
        function 
changeContent() 
        { 
        
document.getElementById('statspage').innerHTML window.frames['lfslapper'].document.getElementsByTagName('html')[0].innerHTML
        } 
        
</script> 
      
        <div id = "statspage"><br>
        <iframe id = "lfslapper" name = "lfslapper" width="636px" allowtransparency="yes" src ="page2.php?selectcar=&selecttrack=&orderby=times&usern=" onLoad = "changeContent()" style = "height:0; width:636px; border-width:0;"></iframe>
        <a href="http://www.lfsforum.net/showthread.php?p=1373747#post1373747" target="_blank"><b><i>Based on script of mc0676</font></i></b></a>
        </div>
    </div>
php
echo $footer;
?>

However, the code doens't work like i want it to work. Eg when filter on best times and BL1, the resulttable (of page2.php) will become too wide and will overlay the menu. I can't see why this happens. I think it has to do with the values of width in the page2.php. What do you think?

You can see an example about what I wrote here at: http://www.sinsanity.nl/testt/ ... y.nl/stats/demo/index.php

So what I want to do is, making the table fit into my website template.

Thanks in advance,
Tim
emit-nl
S2 licensed
done, with no results.. the problem isn't been solved or changed
emit-nl
S2 licensed
uhm, that code is exactly what i have now. So it has got to be something in the page2.php i think. (btw, i made an typing error with width:636x;, must be width:636px;.

Do you have any idea what it could be?
emit-nl
S2 licensed
Hmm, it still won't work for me. I searched for the table you said in page.php and in page2.php and changed it.

But, the problem for me is, I haven't been able to use the frameset code from the index.html. I just tried this, but then the results page will open in a new window:

<?php 
<frameset cols="100,*" frameborder="no">
      <
frameset rows="140,*" frameborder="no">
             <
frame name="lfslapper" width="636px" src="page2.php?selectcar=&selecttrack=&orderby=times&usern=">
            </
frame>
    </
frameset>
</
frameset>
?>

The code I am using atm, but where the table is to wide for my site:

<?php 
    
<div id="sidebar">
        include 
'menu.php' 
    
</div>
    <
div id="content">
       <
script
        function 
changeContent() 
        { 
        
document.getElementById('statspage').innerHTML window.frames['lfslapper'].document.getElementsByTagName('html')[0].innerHTML
        } 
        
</script> 
      
        <div id = "statspage"><br>
        <iframe id = "lfslapper" name = "lfslapper" width="636px" src ="page2.php?selectcar=&selecttrack=&orderby=times&usern=" onLoad = "changeContent()" style = "height:0; width:636x; border-width:0;"></iframe>
        <a href="http://www.lfsforum.net/showthread.php?p=1373747#post1373747" target="_blank"><b><i>Based on script of mc0676</font></i></b></a>
        </div>
    </div>
?>

emit-nl
S2 licensed
Quote from michele0676 :Wich table ?
About internal table where u select track or car u need edit menu.php, it's simple u can find "pixel" value of each "table".

This is a code in page2.php for the tables that will be created. You can see what hapens on http://www.sinsanity.nl/testt/ ... y.nl/stats/demo/index.php.
(If you think, where are the drift options in the menu.php? I removed it, because i don't use it for 'demo'. I will use the drift option in ..../stats/drift/index.php)


<?php 
<tr valign='middle' align='center' (*I also tried to addwidth='636px'>*)
<
td width='28'><font $font><b>POS</b></font></td><td><font $font><b>LFS<br>USERNAME</b></font></td>
<
td><font $font><b>LFS<br>NICKNAME</b></font></td><td width='36'><font $font><b>TRACK</b></font></td>
<
td width='36'><font $font><b>CAR</b></font></td><td width='36'><font $font><b>LAPS</b></font></td>
<
td width='36'><font $font><b>PB<br>DATE</b></font></td><td width='36'><font $font><b>PB<br>TIME</b></font></td>
<
td width='64'><font $font><b>SPLIT 1</b></font></td><td width='64'><font $font><b>SPLIT 2<br>or<br>TOTAL</b></font></td>
<
td width='64'><font $font><b>SPLIT 3<br>or<br>TOTAL</b></font></td><td width='64'><font $font><b>TOTAL</b></font></td></tr>
?>

My website is smaller than the table is, so it won't show properly. I'm trying to make the table fit in my website. The place where it has to come is 650px wide, and has a 7px margin at the left and right. So the table has to be 636px.
When i try to reduce the width of a td, another td will just become bigger.. I can't get it xD

Tim
Last edited by emit-nl, .
FGED GREDG RDFGDR GSFDG