The online racing simulator
Searching in All forums
(446 results)
Krayy
S2 licensed
Quote from tiptop114 :Hi Krayy nice work Just wondering what where the commands to do the races in mins? I forgot from when we spoke the other night

Thanks mate

"!mins 20" will run a race for 20 minutes and add 1 lap at the end
"!mins 20 5" will run a 20 minute race then add 5 laps at the end of that time
"!kms 100" will run a 100 kilometer race
"!kms 100 3" will run a 100 kilometer race and add 5 laps at the end
Krayy
S2 licensed
Quote from capris :thanx for that works fine

another question i ask is when a race has finished is there a way of having a countdown timer on screen before the next race starts from 40 seconds down to 0


at the moment i have the 40 second countdown but it does not show anything on screen

I do have a countdown timer in one of my cif modules for running race events although its not complete yet.

Have a look at any code that uses the openGlobalButton function to open a button and use the %cpt% variable to do the countdown something like this:


<?php 
      openGlobalButton 
("test",60,95,80,10,5,6,16,"^7Track will be changed in (%cpt%) second(s)");
      
DelayedCommand5change_track_2 );
?>

How about we go modular for 6.014+?
Krayy
S2 licensed
Hi guys,

Have you ever tried to upgrade your installation of Lapper only to find that it's blown away a bunch of your settings and customisations?

Well here's a possible answer that I want to run by you all...

The LFSLapper.lpr file is the heart of a Lapper installation and contains variable definitions, Event code, languages etc. What I would propose (and have done in a couple of tests) is to break that up into separate modules that can be modified independently which will make it easier to either update an instance of Lapper while keeping your modified content, or allow us to push out smaller updates to specific parts of Lapper.

Instead of having all of the code inside the main LFSLapper.lpr file, I move parts of it into different files in different directories, e.g. create a file called ./events/OnConnect.lpr that has this in it:

<?php 
#################################################
#Connect messages when a player joins the server#
#################################################

Event OnConnect$userName # Player event
    
$NickName GetCurrentPlayerVar("NickName");
    
$Posabs GetCurrentPlayerVar("PosAbs");
    
$Groupqual GetCurrentPlayerVar("GroupQual");

    
openPrivButton"welc",25,50,150,15,12,-1,ISB_NONElangEngine("%{main_welc1}%"$NickName ) );
    
openPrivButton"pos",25,80,150,10,8,-1,ISB_NONE,langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual  ) );
    
openPrivButton"clos",78,120,20,10,10,-1,ISB_DARK,langEngine("%{main_accept}%"),OnConnectClose );
    
openPrivButton"ref",103,120,20,10,10,-1,ISB_DARK,langEngine("%{main_deny}%"),OnConnectCloseKick );
    
http("http://www.frh-team.net/reglapper/getserver2.php" );
EndEvent

Sub OnConnectClose
$KeyFlags,$id )
    
closePrivButton("welc&pos&clos&ref");
EndSub

Sub OnConnectCloseKick
$KeyFlags,$id )
    
closePrivButton("welc&pos&clos&ref");
    
cmdLFS("/kick " GetCurrentPlayerVar("UserName") );
EndSub
?>


and then in LFSLapper.lpr file, comment out those Subs and the Event and put this:

<?php 
include("./events/OnConnect.lpr");
?>

Now if I want to update the OnConnect event code, I edit that external file instead of the main Lapper file which may break something else.

Do the same with languages by moving all of the language specific content into ./langs/en.lpr or ./langs/fr.lpr or whatever the language is.

What are your thoughts on this, as for mine I think it would make life a lot easier when upgrading Lapper or making your own mods.
Krayy
S2 licensed
Quote from [Audi TT] :error...
for fast driving in pit

See screenshot

Thanks for the highlight. Fix on the way
Krayy
S2 licensed
Quote from capris :hi can anyone help please how do i remove the clean racing and have fun messege just before a race starts lapper is installed on a server from 500 servers but i cant find the option to remove the messege in the LfsLapper.lpr file is the messege somewere else

thanx

It will be in the pitboard.lpr file in the includes folder. Just comment it out by prefixing with a hash
Krayy
S2 licensed
Quote from [Audi TT] :How select a Russian language?

If you use the !myconfig command, that will allow you to select a default language. Any messages that do not have a specific language translation will default to english.
Krayy
S2 licensed
Quote from Lexanom :Yes! It's perverted, but I have not found another way to driftmeter update quickly.

Okay, makes sort of sense, even though I think your Lapper server will get hammered. I've updated LFSLapper 6.014 to allow for any positive number to be allowed, so it won't reset it to 100. This code:

<?php 
            privMsg 
("distToDo = " getConfigVar("distToDo") );
            
setConfigVar("distToDo"10);
            
privMsg ("distToDo = " getConfigVar("distToDo") );
?>

Shows the results in the attachment
Krayy
S2 licensed
Quote from Lexanom :No errors, everything is working properly.
But min $distToDo=100, and I need =1
Or need another way to update driftmeter more often than once per second...

So your script is using the DistDone event to do something every meter a racer travels?
Krayy
S2 licensed
UPDATE: Bug found and squashed (thanks AudiTT for the find)
What was happening here is that the OnDisconnect event was being triggered prior to the players UCID being removed formt he connection list, so when the event message was being delivered via GlobalMsg, it was trying to send the message to an invalid connection as the player had already left the server. Changed the order in which it did those 2 things and now we're okay.

e.g changed

<?php 
            string
[] args = new string[2];
            
args[0] = currInfoPlayer.userName;
            
args[1] = lostConnection.Reason.ToString();
            
newCfg.executeFunction("OnDisConnect"nullargs);
            
listOfPlayers.removePlayer(newCfg,lostConnection.UCID);
?>

to

<?php 
            string
[] args = new string[2];
            
args[0] = currInfoPlayer.userName;
            
args[1] = lostConnection.Reason.ToString();
            
listOfPlayers.removePlayer(newCfg,lostConnection.UCID);
            
newCfg.executeFunction("OnDisConnect"nullargs);
?>

Zip file updated on post #1
Krayy
S2 licensed
Quote from [Audi TT] :copy & paste from the LFSLapper.lpr file


<?php 
Event OnDisConnect
$userName$reason # Player event
    
globalMsg langEngine "%{main_left_server}%"$userName ));
EndEvent
?>



Try commenting out teh GlobalMsg in the event and reloading to see if you get the same issue as there may not be a matching message in the Russian language section
Krayy
S2 licensed
Quote from Lexanom :Now I use 6,012

Hooray!)
tnx


//Which file should be replaced, that the "sqrt" to work? After replacing LFSLapper.exe stopped working $distToDo=1
I used it for a quick update driftmeter. What should I do now? DelayedCommand (1 , ...) for far too long.

The sqrt function is built in to the Lapper.exe file, so you will need to update your installed Lapper to 6.014. Have a look at the readme in the docs directory and also check the error logs in your Lappers instance directory e.g. c:\Lapper\default\logs\127-0-0-1_39399_error.log
Krayy
S2 licensed
Quote from [Audi TT] :No. See screenshot. Messages shot when exit one driver.

Could you please copy & paste the contents of your OnDisconnect event from inside the LFSLapper.lpr file, e.g.:

<?php 
Event OnDisConnect
$userName$reason # Player event
    
globalMsg langEngine "%{main_left_server}%"$userName ));
EndEvent
?>


Krayy
S2 licensed
Quote from [Audi TT] :
IS_MTC - could not find destination


Anything in the error logs?

They are found in LFSLapper/<instance>/logs/<ip address>-<port>-err.log
Krayy
S2 licensed
See post #1 for 6.014 release.

Let me know any bugs or oddities that you find.
Krayy
S2 licensed
Quote from Lexanom :

<?php 
$X1
=10;
$Y1=10;
$X2=GetPlayerVar"lexanom""X" );
$Y2=GetPlayerVar"lexanom""Y" );
$distX ToNum$X1 $X2 );
$distY ToNum$Y1 $Y2 );
$dist = (($distX*$distX) + ($distY*$distY))^(1/2) ;

openGlobalButton"dst_",75,0,50,10,1,-1,0,strFormat"^0distance: {0:F3} m"$dist ) );
?>

distance: 171925

I've added a sqrt function to Lapper which will appear in the 6.0.1.4 release.

e.g.

<?php 
            $X1
=10;
            
$Y1=10;
            
$X2=20;
            
$Y2=20;
            
$distX $X1 $X2 ;
            
$distY $Y1 $Y2 ;
            
$dist = ($distX*$distX) + ($distY*$distY);
            
privmsg "dist = " $dist " and sqrt is " sqrt ($dist) );
?>

= 14.14213
Krayy
S2 licensed
Quote from Dygear :Eek! Considering the contexts that they are used in, that was an interesting design choice. Why did you guy go this route?

I believe that this was a holdover from the first iteration of Lapper way before Gai took over. I had a couple of attempts at extricating them but it broke a few things further down the chain. It'll take a huge rewrite to get them separated, although it may happen one day.
Krayy
S2 licensed
Quote from Lexanom :Well, it will wait

//By the way. Why can not I use the mathematical extraction of the square root of floating point numbers? For example, the Pythagorean theorem:
$dist=($x*$x+$y*$y)^(1/2);
and the like not working..(

It may be that you need to explicitly cast the variables to a numeric using the ToNum function as by default, Lapper variables are untyped and sometimes this causes issues when using them in expressions. Do some searching through the LPRs to see how to use ToNum
Krayy
S2 licensed
Quote from Lexanom :Will it ever implemented collision check?

// IS_CON reports contact between two cars (if ISF_CON is set)
// IS_OBH reports information about any object hit (if ISF_OBH is set)

I had started to implement collision checking into lapper but it is a difficult task. One of the main reason is that Lapper doesn't differentiate between UCIDs and PLIDs, which affects a number of things which is why using AIs with lapper is not recommended, so until we do some rewrites to separate those IDs, it's just not practical.

That being said, I do have most of the code done to support collision detection in a test build which may be released in the future. No promises though
Krayy
S2 licensed
Hi guys,

laptop rebuild is done now and my team has started racing again (LFSNZ), so I now have a reason to step up the development stuff.

A couple of you had issues with running 6.0.1.3 under Mono as I had done the last compile using Visual Studio. I am now using Monodevelop to do the compiles so that should help compatability for the next version.

Which means....6.0.1.4 should be available soon.

I'll keep you posted.
Krayy
S2 licensed
My immediate guess here is that as the user is a new connection, it has not registered that they have chsoen a car yet.

To test this out, write a short test command to do your code to the chat window using privMsg
Krayy
S2 licensed
Sorry for the delay in fishing the addons...I've had a new work laptop and am still trying to configure it.

Updated pitboard.lpr will be posted next week
Krayy
S2 licensed
Quote from sarxes :I have a problem if i click on the Who tab in !help menu, its shows always an error in the left up corner.

That was a debug messagage in the cif/info_who.lpr file...just search for the privMsg line with "id is" in it and comment it out
Lapper To-do and Wish lists
Krayy
S2 licensed
Hi guys,

Here's a forum so that we can track feature requests and progress for Lapper itself and any .lpr addons. Hopefully this will augment things like change logs and also allow for a place where people can make specific feature request. Then I can put them into the top thread here and track how we're going implementing them. So post your requests and if they get onto the list, we'll see how we go.

Note: I'm off on holiday for a week so will get back to the forum after that, with first cab of the rank being fixing pitboard.lpr so that it works correctly.

Lapper features
+ Implement full track pathing if the .pth files are available to track if racers are on/off track and positioning
+ Split racer data into connection/player to support AIs
+Cannot load lapper as a guest (while in a server) on a local computer, only as a host.

Other requests/Bugs:

https://docs.google.com/spreadsheets/d/1cnqaLgikQwNymjjP5AG872BB3x63H97Hnq6AzkrrLi8/edit?usp=sharing


Lapper addons
+ Update pitboard.lpr to support Lapper 6.013
+ Make CIF the defacto standard interface and move other modules that use GUIs to use CIF.
Last edited by Bass-Driver, .
Krayy
S2 licensed
Quote from Yisc[NL] :Thanks for the re-release of 6.0.1.3
I couldn't find the changes, do yo have quick changelog please?

Only change was a logic fix to how the voting system worked so that you need to run X laps before being able to vote (if you want).

Main mods were to the number of lprs and which ones are active by default. As I said, the inactive lprs should be considered betas for the momnet and we'll update them as we go. Actually if we create a new thread for lprs and put each one in its own post, we can track changes better.
Krayy
S2 licensed
Alright I've put up a new zip file with some of the in-work modules disabled (like the pitboard).

At least it'll let people get on and play with some of the new bits.

In an upcoming release I'm going to modify the way it does set up where the first time someone logs on with the admin password, they will be taken to the Membership Admin screen (!ma) where they will then have to set their privledges and anyone else.

That will get rid of the group text files...acxtually I just had an idea to create a generic GUI module to allow creation of groups and to add or remove people from them. That will wait for later.

have fun and let me know any issues
FGED GREDG RDFGDR GSFDG