The online racing simulator
Searching in All forums
(882 results)
Bass-Driver
S3 licensed
ok thx,

could you tell me what is wrong with this link lol

http("https://velocitymsports.com/testscript.php?uname=Bass-Driver");

Error:
8/2/2020 8:01:57 PM -> Syntax error: in file "" at line #1
Token not catched

if you go straight to the link it works as it should.
https://velocitymsports.com/testscript.php?uname=Bass-Driver

The "local" link works aswell
http("http://localhost/testscript.php?uname=Bass-Driver");

EDIT:
php script looks like this:


<?php 
if(isset($_GET["uname"])) 
{
    echo 
'GlobalMsg("Welcome '.$_GET["uname"].'");';
    echo 
'privMsg("Welcome '.$_GET["uname"].'");';
    echo 
'cmdLFS("/msg Welcome '.$_GET["uname"].'" );';    
}
?>

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
as first thank you for helping.

and i have to apologize about this request for help.

I looked into the sourcecode. Because something this simple isnt working, so it could be the sourcecode.

Well, it turns out that some lines were disabled (for a long time) that handles returning webrequests. I think it happend during a fix for TechEdison about sending http requests as non player.

https://www.lfs.net/forum/thread/92272

That also explains the console messages (Debug messages).


The Lappercode


<?php 
CASE "!http":
    
SendWebRequest($userName);
BREAK;    
    
sub SendWebRequest($Player)
    
privmsg($Player,"Send webrequest");
    
http("http://localhost/testscript.php/?uname=".$Player);
EndSub
?>


PHP Script:


<?php 
php
if(isset($_GET["uname"])) 
{
    echo 
"globalmsg(\"^6Return Text!\");";
}
?>

?>

Now i can figuring out how to send variables from the web.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
oke that outputs the username of the OnMSO event, as it should.
but i need to check my console more often, because it outputs everything i send/receive to the web. dont think this is normal.

but that is not how i code the command and php script.

changed the 'echo' text a bit.

Bass-Driver
S3 licensed
still doesnt work
Bass-Driver
S3 licensed
i use XAMPP(apache webserver) to run PHP scripts, and i can run php scripts with no problem.

so i think there is something wrong with the connection between LFSLapper and the Webserver.

i'm not into php stuff but , there is a way to check if the script receives any $_GET["uname"] data in realtime?
Like auto pagerefresh when data is being received.

i checked google already, but couldnt find what i'm looking for.
Bass-Driver
S3 licensed
I opened this thread, because this isnt working for me.

I created a simple script and that doesnt even work.
Let me explain what i did so far.
  • Created a webserver with XAMPP.
  • Created a script named testscript.PHP
Script look like this:

<?php 
if(isset($_GET["uname"])) 
{
    echo 
"".$_GET["uname"];
}
?>

  • Tested the script: http://localhost/testscript.php/?uname=Danny
-Output: Danny
  • Created a command in LFSLapper with the HTTP() Function, looks like this

<?php 
CASE "!http":
   
$uName http("http://localhost/testscript.php/?uname=".$userName);
   
globalmsg("Hello: ".$uName);
 BREAK;
?>

but it doesnt return anything.
Could someone help me with this. It looks so simple. And maybe it is something simple i havent seen.

Thank you
Bass-Driver
S3 licensed
nice designed layout.
Only the Blackwood curbs are awefull Tongue

My teammate and i did some laps on it.
Some times are easily to beat.

Bass-Driver
S3 licensed
Hello Itamar,

As first, thank you for using LFSLapper.
As second, i move your post to a new topic.

As third:

Click on the link below to find a small tutorial about install/setup LFSLapper.

https://www.lfs.net/forum/post/1305869#post1305869

If you have any more questions. Let us know.
Bass-Driver
S3 licensed
I implemented that in of the testversions of V7.0.6.4
But since than, Lapper was spitting out weird errors and the database was acting strange.

I have removed that function.
EDIT: PublicTest_14: Lapper V7.0.6.4

Not sure if i will implement it again.
or someone else has todo it.
Bass-Driver
S3 licensed
ye sorry,
looking throught that script, it seems that many lines has been disabled.
So no need to disable the script.

### SET THE FOLLOWING VAR'S TO SETUP YOUR SERVER WHEN LFSLAPPER (RE)START ####
$GUI_Lap = 5 ; #Number of race laps
$GUI_qual = 10 ; #Number of qual minutes
$GUI_wind = 0 ; #0=no wind 1=low wind 2=hard wind
$GUI_weather = 1 ; #set type of wheather 0,1 or 2
$GUI_mustpit = "no" ; #need to pit yes or no
$GUI_fcv = "no" ; #Force cockpit view yes or no
$GUI_drift = "no" ; #Drift option yes or no ( see the part at end of this script)
$GUI_midrace = "yes" ; #Join midrace yes or no
$GUI_start = "finish" ; #Race start order : fixed/finish/reverse/random
$GUI_current_car = "?" ; #You can set here the default car. If not set,the first time when the config GUI start its show's a "?".
### END ###

# cmdLFS( "/laps " . $GUI_Lap );
# cmdLFS( "/qual " . $GUI_qual );
# cmdLFS( "/wind " . $GUI_wind );
# cmdLFS( "/weather " . $GUI_weather );
# cmdLFS( "/mustpit " . $GUI_mustpit );
# cmdLFS( "/midrace " . $GUI_midrace );
# cmdLFS( "/fcv " . $GUI_fcv );
# cmdLFS( "/start " . $GUI_start );

Bass-Driver
S3 licensed
Thx Yisc for the quick fix.

Going to disable that script in the next update.
To avoid the confusion.
Bass-Driver
S3 licensed
i havent seen this before.

-Which LFSLapper version do you run?
-Did you have this issue with older Lapper versions aswell?
-Are your sure the server is configured correctly?

look those the options below:

// qualifying minutes, 0 for no qualifying
/qual=0

// number of laps, 0 for practice
/laps=0

// if laps not specified: hours
//hours=24

Bass-Driver
S3 licensed
lol, is this script still being used.

Thanks for the bug report.
This was a easy fix.

Check first post for the new version. version 0.4
Bass-Driver
S3 licensed
Oh oke, let me ask you something first.

On which track and which cars do you want to use for your video's.
Want to see some of your driftingskills.
Bass-Driver
S3 licensed
Indeed, i want to release this version as soon as possible, if this testversion is stable enough.
i think it is, because some lapper powered cruiseserver is hitting 20+ players sometimes.

i'm not that busy with LFS (more afk than actually doing something) and the good weather isnt helping either Tongue

Also, thanks for the request.
Will look into that tomorrow or this weekend.
Shouldnt be that difficult to add.

That means that the new OnPlayerFlags event will not be compatible with the old one.

Old OnPlayerFlags event: OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$Time) # Player event

New OnPlayerFlags event: OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$CarBehind,$Time) # Player event


Edit:
might used "wrong" insim packet for the playerflags.
I used the MCI insim packet for the yellow/blue/lag flags.
I have no idea if the blue flag of the MCI packet is the same as the FLG insim packet.

lets see, how i can combine the 2 packets together
Last edited by Bass-Driver, .
PublicTest_14: Lapper V7.0.6.4
Bass-Driver
S3 licensed
Hello Everyone,

It took a while, but here is a another PublicTest version.

Some important changes

Added: 'Currlap' playervar
Added: SetCarHandicap();
Removed: $StoreOfflineData = false; #storedvalue.dbs Store Offline data , even when the player doesnt exist in the database.

Known Issues:
-Read '/' (forward slash) from script.


Changelog:
#################################################################
#LFSLapper changelog: Updated @ 07-05-2020
#################################################################
+---------------------------------------------------------------+
|Changes from 7.0.6.3 to 7.0.6.4 Public Test_14B |
+---------------------------------------------------------------+
=================================================
New:
=================================================
1: New function: PlayerDelayedcommand(); #Start delayedcommand for a specific player

$UserName = "Bass-Driver";
$NameOfDelay = "CloseButton";
$DelayInSeconds = 3;
$SubCallBack = "ThisSub";

PlayerDelayedcommand($UserName,$NameOfDelay,$DelayInSeconds,$SubCallBack);

2: New function: RemovePlayerDelayedCommand(); #Remove delayedcommand for a specific player

$UserName = "Bass-Driver";
$NameOfDelay = "CloseButton";

RemovePlayerDelayedCommand($UserName,$NameOfDelay);

3: New function: RegisterPlayerDetection(); #Detect player within a fieldofview and distance.

#Example
#$userName = Set Player for the detector
$userName = "Bass-Driver"; #The Detector is now enabled for Bass-Driver

#$FieldOfView = Set range of the view to detect players. (degrees)
$FieldOfView = 30; #view will be 0 to 30 and 0 to -30

#$Distance = Max distance of detection (Meters)
$Distance = 25;

#$NameofSubDetected = Execute Subcallback when 1 or more players are detected.
$NameofSubDetected = "PlayerDetected";

RegisterPlayerDetection($userName,$FieldOfView,$Distance,$NameofSubDetected);

#==========================================
#Sub callback
#==========================================
Sub PlayerDetected($userName,$DetectedPlayer)
OpenButton( $userName, "PlayerName",170,115,30,5,2,5,96, "^3Player: ^7".GetPlayerVar($DetectedPlayer,"NickName"));
OpenButton( $userName, "Speed",170,120,30,5,2,5,96, "^3Speed: ^7".GetPlayerVar($DetectedPlayer,"InstantSpeed")." km/h");
OpenButton( $userName, "Distance",170,125,30,5,2,5,96, "^3Heading: ^7".GetPlayerVar($DetectedPlayer,"Heading"));
EndSub

4: New Function: SetCarHandicap();
#This function applies handicap to all drivers using a particular car model
$Car = "XRT";
$H_Mass = 100; CarMass 0 - 200 in KG
$H_Tres = 10; Car AirIntake in %

SetCarHandicap($Car,$H_Mass,$H_Tres);
#########################################
#DISCORDBOT FEATURES
#########################################
5: New Event :

- This event will be executed when someone sends a discord message to LFSLapper.
- A Discordbot must be created to communicate between LFSLapper and Discord.
- In 'bin/default/includes/myInc.LPR' you can enter the 'DiscordToken' and the 'Discordchannel' to receive the messages from.
- Link to create a discordbot: https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
- Set DeveloperMode in your discordsettings to "ON' to copy the channel ID ( rightclick on the channel)

Event OnReceiveDiscordMessage($DiscordUname,$Text) # Player event
#Your code
EndEvent

#This function sends messages to your selected discordchannel.
#The discordbot must be connected while using this function

6: New Function: sendmessagetodiscord();
$DiscordChannel = "000000000000000000";
$Message = "Hello";
sendmessagetodiscord($DiscordChannel,$Message);

7: New setconfigvar() value: "DiscordBotStatus"
setconfigvar("DiscordBotStatus",$argv); #change the status of the discordbot

8: New Playervar: 'CurrLap' GetPlayerVar($userName,"CurrLap");
retreive player's current lap.
EndSub
=================================================
Changed:
=================================================
1:Hostname now visible when lapper succesfully connected to a server.
2:New errormessages to MSS file before Lapper starting (faulty adminpass)
3:Realtime driftscore refreshrate is set to 5 times a second instead of 10.
4:NumtoMSH(); returns values in HH:mm.ss format, was HH.mm.ss before.
5:Event oncrossingchecker: returns now which insim checkpoint you crossed.
Checkpoint >>
1st checkpoint
2nd checkpoint
3rd checkpoint
Finish line

6:Event oncrossingchecker: returns time in H:mm:ss format.
7:GetWr(); allows 1 parameter "CAR". Example below
CASE "!getwr":
IF($argv != "")THEN
$GetWRInfo = GetWR($argv);
ELSE
$GetWRInfo = GetWR();
ENDIF
privmsg("^7============================");
privmsg("^3WR Info:");
privmsg("^7============================");
privmsg("^7Car: ^8".$GetWRInfo["CName"]);
privmsg("^7Track: ^8".$GetWRInfo["Track"]);
privmsg("^7Racer: ^8". $GetWRInfo["racerName"]);
privmsg("^7Time: ^8".NumToMSH($GetWRInfo["WRTime"]));
privmsg("^7Sp1: ^8".NumToMSH($GetWRInfo["Split1"]));
privmsg("^7Sp2: ^8".NumToMSH($GetWRInfo["Split2"]));
privmsg("^7Sp3: ^8".NumToMSH($GetWRInfo["Split3"]));
privmsg("^7Last: ^8".NumToMSH($GetWRInfo["SectorLast"]));
BREAK;
8:GetWR(); Added 2 new values: Date & Time. Date/Time of WR
$GetWRInfo["Date"]);
$GetWRInfo["Time"]);

9: Reduced IS_BTN Packetsize with 16 Bytes
10: Reduced IS_MTC Packetsize with 8 Bytes

=================================================
Fix:
=================================================
1: WriteLine() :Lapper crash when try to convert special LFS characters
2: Write() :Lapper crash when try to convert special LFS characters
3: LFSLapper.LPR : one of the debugoption turned on
4: LFSLapper.LPR : debugmessages
5: No returning value when accidently applying NumtoMSH(); twice
6: Changed hardcoded visible records in Toplist/UserTop/Drifttop from 24 to 10000
7: Linux/mono users couldnt start Lapper on theire computer (Testfase)
8: GetWR(); Couldnt get RO11 WRtime
9: Lappercrash when running 2 lapper instances with the same remoteport.
10: Lappercrash on Joinrequest() when Playerheight is lower than 0.

Bass-Driver
S3 licensed
Hello,
i'm trying to publish a new test version this weekend.

Will be Public_Test V14.

Some versions havent made it to public. Because some of them were too experimental.

Knows Issues: Cannot read '/' char properly.
Bass-Driver
S3 licensed
you can open .LPR files with any texteditor. Or you have to find some 3rd party application to open textfiles. .lpr in this case.

[EDIT]
With a quick look on the web, you could try 'coderunner'.

some info.
https://setapp.com/how-to/alternative-to-notepad++-for-mac
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
hello,
i assume the lapper version you have is 7.0.6.2 which has indeed a small oopsie in the lfslapper.lpr script.
i forgot to delete a message.
Bass-Driver
S3 licensed
DEMO and South City, riiiiight.

Dont be stupid and support the LFS devs, please buy the game legit.
Great content is coming and with your support its gonna be better.


-Restart the dedicated server / your lfs.
-Be sure your Insim port is the same as the insim port on your lapper.
-DO NOT type the insimport command ingame or in the dedicated window.
-Start Lapper.
-Have fun
Bass-Driver
S3 licensed
Hi Mizil,

i think you are running an older version of LFSLapper. i think its 7.0.6.2.
i've made a small booboo,

Check LFSlapper.LPR and search for that text.
Its an openglobalbutton() function with that text.

delete that line and reload Lapper, and you are good to go.
Bass-Driver
S3 licensed
After a long time being busy with a lapper powered cruiseinsim ([SC] Simple Cruise). It was time to take a break due some personal reasons.
Last week i been looking throught my lapper files and i saw my TimeAttack addon. I've done some changes with the knownledge, i got from working on the cruiseinsim and together with DLocky(finland69), we decided to create a server specially for the timeattack addon.

Server: VMS : TimeAttack
Discord: VMS Discord

Summary of changes:

V2.03(19-01-2020)
Add: Save/Load userstats filesystem
Add: !stats command to display your stats to other players.
Add: Earn Credits and LicensePoints
Add: Saving CarDistance and TotalDistance
Update: Top HUD now contains the distance of the car you are driving.
Update: !help, added a new tab with player stats.
Fix: Splittimes didnt displayed correctly.
Fix: Other small fixes and updates.

Feel free to join and ill see on the track.
Bass-Driver
S3 licensed
South City is looking good now. Keep up the good work.
Bass-Driver
S3 licensed
Just a another note:
iceman121 is having a testversion of LFSLapper, where i "fixed" the packetsize (IS_BTN) of each button.
Each empty button was sending 28 bytes instead of the documented 12 bytes.
DCON Crash: LFS 0.6U
Bass-Driver
S3 licensed
Today i got informed that one of the dedicated servers i host for someone is offline for some reason.
After looking onto it, seems that one of the dedi's has been crashed.
See the summary of the crash below.

Gebeurtenisnaam van probleem: APPCRASH
Naam van de toepassing: DCon.exe
Versie van toepassing: 0.0.0.0
Tijdstempel van toepassing: 5c89394e
Naam van foutmodule: DCon.exe
Versie van foutmodule: 0.0.0.0
Tijdstempel van foutmodule: 5c89394e
Uitzonderingscode: c0000005
Uitzonderingsmarge: 0001b6b1
Versie van besturingssysteem: 6.1.7601.2.1.0.256.1
Landinstelling-id: 1043
Aanvullende informatie 1: 0ed0
Aanvullende informatie 2: 0ed015bcf632518a1a15e595a38684a2
Aanvullende informatie 3: d14f
Aanvullende informatie 4: d14f03d7e865b42f6941a748a5768fac
Last edited by Bass-Driver, .
FGED GREDG RDFGDR GSFDG