The online racing simulator
Searching in All forums
(882 results)
Bass-Driver
S3 licensed
oke guys,
My reaction was more of a joke.

And yes i know that these kind of questions/persons exists.
You can tell on how the question is being ask, how much the person has done on their side.
But still i'm trying to be helpfull, but there is a limit.

Anyway lets not go off-topic. You guys made your point.

Thank you.
Bass-Driver
S3 licensed
Can you ask less odd questions, thanks. Big grin

First the SQL databases and now this,
Omg, what did i do to you Big grin
Bass-Driver
S3 licensed
Did you do any debugging at all?

Do some proper tests please.
Create some "debug" messages to see where and what the problem is.
Bass-Driver
S3 licensed
What did you do to test the code?

-Does the event execute?
etc etc

Do that first.
Bass-Driver
S3 licensed
show me the code.
its a LFS command, so it should work.
Bass-Driver
S3 licensed
there are a few post on the LFSLapper developer forum (Search) with a few example about trackuserdistance() and GetAngle(). The rest is up to you to test and write example codes to understand the code and merge/implement it in your own script.
Bass-Driver
S3 licensed
There is nothing that need to be updated.

You do not need to post each and every error on the forum. Its a common practise to read the error and debug your code, before panicing and spamming the forum with your own created errors Did I Say That?
Bass-Driver
S3 licensed
I've added that warning, just to notify the user why joinrequest() doesnt work.

But you can prevent it by adding a check, if the player is on track or not.


IF(GetPlayerVar($userName,OnTrack) == 1)
THEN
#Player on track
ELSE
#Player NOT on Track
ENDIF

Bass-Driver
S3 licensed
Thats not a error but a warning.

You cannot respawn spectated players.
The player MUST be on track to execute the joinrequest() function.

LFSLapper literally tells you this as you can see.
Bass-Driver
S3 licensed
which error message did you get.

Warning on Command: 'joinrequest' Cannot spawn spectated players

or

Syntax error: in file ".\default\LFSLapper.lpr" at line #xxxx
Token not catched
Function 'onmso' script aborted
Bass-Driver
S3 licensed
1st: Warning on Command: 'joinrequest' Cannot spawn spectated players
2nd: i miss an IF statement.
3rd: nicknames doesn't work in privmsg() functions.
Bass-Driver
S3 licensed
@RealistAdam: Please tell us what causes LFSLapper to crash, so we can fix it in the next versions of LFSLapper.

My quick investigation to the crash:

LFSLapper seems to crash when the playername doesn't exist, and is being used in the privmsg() function.
This need to be fixed in the next version of LFSLapper.

I've added a extra check to the command if the playernames are entered correctly.
Be aware that the usernames are capital sensitive.

For example: Bass-Driver is correct and bass-driver isn't.

CASE "!pm":
IF( $argv != "" ) THEN

$idxSpace = indexOf( $argv, " ");
IF( $idxSpace != -1 ) THEN

$User = subStr( $argv,0,$idxSpace );

#Check if Player is online on the server.
$currPly = getPlayerInfo($User);
IF( $currPly != "" ) THEN
$Message = trim( subStr( $argv,$idxSpace ) );

privMsg( $User , "^1[PM] ^7". $userName . " ^0>> ^3" . $Message);
privMsg("^1[Private Message] ^7". $User . " ^0>> ^3" . $Message);
ELSE
privMsg ( "^7Player does not exist");
ENDIF
ELSE
privMsg ( "^7Incomplete command: !pm <username> <Message>" );
ENDIF
ELSE
privMsg ( "^7Incomplete command: !pm <username> <Message>" );
ENDIF
BREAK;

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
do you see all the privmsg() messages in the chatlog?

What do you mean, you do not have permission to share this?
Is this your code or is someone else coding it?

So many questions are going on in my mind right now.
Bass-Driver
S3 licensed
according to the changelog of 7.0.6.0

Soundoption for globalmsg(); / privmsg();
NOTE: is compatible with older scripts.

0 = No Sound
1 = Message Sound
2 = SystemMessage Sound
3 = InvalidKey Sound
4 = ERROR Sound
5 = NUM Sound

-Possible options for globalmsg() :
globalmsg("BLAHBLAH");
globalmsg("BLAHBLAH",0);
-Possible options for privmsg() :
privmsg("BLAHBLAH");
privmsg("BLAHBLAH",0);
privmsg($userName,"BLAHBLAH");
privmsg($userName,"BLAHBLAH",0);

Bass-Driver
S3 licensed
If you checked and understand the code.you see its only sent to admins.
Bass-Driver
S3 licensed
Should something like this, the code has not been tested.

CASE "!a":
IF($argv != "") THEN

#Getlistofplayers
$ListOfPlayers = GetListOfPlayers();
FOREACH ($Player in $ListOfPlayers)

$User = $Player["value"];
###Send message if a user is an admin
IF( UserisAdmin($User) == 1 )THEN
privmsg($User,"-----------------------------------");
privmsg($User,$userName." send a adminmessage");
privmsg($User,$argv);
privmsg($User,"-----------------------------------");
ENDIF

ENDFOREACH
ELSE
privmsg("Message not detected, correct syntax: !a <message>");
ENDIF
BREAK;

Bass-Driver
S3 licensed
could you give any examples like pictures or videos or whatever.

"system on the TC server" is not a good example.
Bass-Driver
S3 licensed
try \/
Because forward slash '/' is also used by discord as a command. like /n for example.
Do not think this is a LFSLapper issue.
Bass-Driver
S3 licensed
Quote from Androphp :I'm really obsessed with the mysql thing. If you can add mysql to the lapper, I will actually stop using .txt files from now on.

You asked this already:
https://www.lfs.net/forum/thre ... QL-Connection-New-Version

You can store up to 2TB of data with SQLite. Implementing MySQL will be more complicated for users to use LFSLapper.

I do not see any benefits to implementing mysql into LFSLapper.
Beside that, i have no experience with databases, so thats a nogo for me. And i'm not want to do a another big project for LFSLapper. The mod thing was already something above my level as a non-programmer.

The code of LFSLapper is opensource. So you take a look at the code and see if you can implement it in a way so its easy to use for other LFSLapper users.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
yes you can connect your LFSLapper to a lfs rented server.

You need the IP and Insim port of your rented LFS Server.
And you need to whitelist your own IP (IP you get from your ISP) in the LFS Hostpanel (Access Control Tab)
Bass-Driver
S3 licensed
The code below will display each player: NickName plus UserName, into the discord embed.

$ListOfPlayersDiscordEmbed = "";
$LoP = GetListOfPlayers("U");
FOREACH ($Player IN $LoP)

$UserName = $Player["value"];
$NickName = GetPlayerVar($UserName,"NickName");

$NickUserNameString = "".StripLFSColor($NickName)."(".$UserName.")";

###Create a new line after each $NickUserNameString has been added to $ListOfPlayersDiscordEmbed
$ListOfPlayersDiscordEmbed = $ListOfPlayersDiscordEmbed."".$NickUserNameString." \n";

ENDFOREACH
$DiscordChannel = "";
$Title = "";
$Desc = "";
$Color = "0xFFFFFF";
$FieldTitle = "List Of Players:";
$FieldValue = "".$ListOfPlayersDiscordEmbed."";
$FieldInline = "True";
$Footer = "";
$ThumbnailUrl = "";
$ImageUrl = "";
SendDiscordEmbed($DiscordChannel,$Title,$Desc,$Color,$FieldTitle,$FieldValue,$FieldInline,$Footer,$ThumbnailUrl,$ImageUrl);

Bass-Driver
S3 licensed
Could you explain what you did. With a examplecode
Could be helpfull for other lapperusers
Bass-Driver
S3 licensed
that can easy be calculated with Lapper.

$GetDistanceInMeters = trackuserdistance($userNameOne, $userNameTwo);
$GetAngleInDegrees = GetAngle($userNameOne,$userNameTwo);

Bass-Driver
S3 licensed
hmm
i think i mis understood Pasci's post.
I thought he tried to connect a LFSLapper locally instead of via multiplayer.

So he could use outgauge and other local insim packets. Which do not work via multiplayer.
Bass-Driver
S3 licensed
Its really nice that you try to build a interface for streaming purposes.

I havent see anyone using LFSLapper locally, so do not know if it actually works. Besides that, the local features like outgauges do not exist in the Lapper library.

I think its better to build a local insim with the InSim Library.

I'm sorry, that i cannot help you from here.
FGED GREDG RDFGDR GSFDG