The online racing simulator
Searching in All forums
(93 results)
Androphp
S3 licensed
Quote from Degats :[long text]

I'm sure there is a text that will summarize the whole issue and really the TC server has been keeping the LFS audience alive for years and it is not nice to blame TC for what happened, I think your explanation is very sufficient for the LFS developers and I think they should start fixing the problem themselves now.
Last edited by Flame CZE, . Reason : Removed a very long quote
Androphp
S3 licensed
Nobody sells something like this
Androphp
S3 licensed
Quote from chucknorris :You must not forget that this unlock mechanism was primarily meant for offline use, which is ok. But your idea is basically what I've described here https://www.lfs.net/forum/post/2081329#post2081329

If there was only one PC designated for online use, and only the owner of the web-password can set this, it would help a lot. Because, if there was a person renting out accounts, he'd either have to reset the assigned PC over and over again (which would cause alot of attention), or give out the web password to the person renting. Which he won't do, as he'd basically give away the entire account.

I think what you're talking about is just a simple example because I'm sure there are people out there who can get over this even if they give out their web password or stay connected to a single computer.
Androphp
S3 licensed
Quote from Scawen :Please don't send us all the information. We can't just take your info and start banning accounts.

I know you are trying to help but we cannot spend every minute of our lives investigating Turkish LFS racers, poring over the evidence and trying to be judge and jury too. I am a software developer trying to find a bit of time to do some actual development. I am not a underpaid policeman and I'm start to get fed up looking into all this rubbish. Even though you are trying to help, it just takes more of my time, not less.


This is the part I can't understand. Shrug

You can't just say something that makes no sense at all, and expect me to take that as a reason for something.

In short, it's like making money by playing games in your spare time.
Androphp
S3 licensed
Quote from moujuqalbi :androphp dc var mı

andro.php
Androphp
S3 licensed
Quote from Bass-Driver :IF you have other example codes. You could give it to me, so i can create a tutorial for it with example codes.
Like i did with the Discord feature.

It will be really difficult for you to explain how the http code works or to try to train people to run it or to try to provide a website training. Especially for someone who doesn't know anything, creating a website infrastructure, reading PHP codes and directing them to the game (I'm sure they will get many errors while doing these) because every new person experiences these problems. If you believe that you can explain it and deal with the problems arising here, I can share a few simple code examples.
Androphp
S3 licensed
Quote from Bass-Driver :It took some time,headaches and cursing to windows to get a webserver and PHP working on my PC.
Do not ask me on how or what i did it to setup a webserver with .PHP file extensions.Big grin

But i finally got some results.Thumbs up

The http() function is to execute other functions like:

Sub BlahBlah($something,$something);
EndSub

I've started with creating a simple command named !http.
Within that command, i've executed the http() function with the link to my local website.


CASE "!http":
$user = $argv;
http("http://localhost/Test/LFSLapper_Test.php?u=".$user);
BREAK;

inside the folder of the website, i created a PHP file and took some code i've found on this LFSLapper sub forum .Later i've added more stuff just for testing.

<?php
$allowed_list = array(

"TechEdison" => "no",
"Androphp" => "yes",
"Bass-Driver" => "yes"
);

$username = $_GET["u"];

if (array_key_exists("".$username."",$allowed_list))
{
if($allowed_list[$username] == "yes")
{
echo 'WebReturn('.$username.',"Allowed");';
}
else
{
echo 'WebReturn('.$username.',"Not Allowed");';
}
}
else
{
echo 'WebReturn('.$username.',"Not Found");';
}
?>

The code will check, if the username exist within the array named: $allowed_list
After that it checks if the username is allowed or not.

The return value must be a function and not a single character,number or word.

Example
'privmsg('$username.',"something");';
'globalmsg("something");';
'YourOwnNamedFunction("Parameter");';

In the testcode above, it returns a string named WebReturn('.$username.',"Not Found");
The LFSLapper sourcecode will translate this into a function with their given parameters.

Back to my Lapperscript, i've created a sub function with the parameters.

Sub WebReturn($User,$Allowed)
globalmsg("Player: ".$User." = ".$Allowed);
EndSub

Output:
Player: TechEdison = Not Allowed
Player: Androphp = Allowed
Player: 0 = Allowed (i have no idea why it returns a 0 when i'm in the server, this could be old lapperbug)


Please correct me, if i did something wrong. I'm totally not into web stuff.

Thank you for your answer, this seems like something really useful, I will try this code because it will be easier to check the codes I have implemented in PHP on Lapper, thank you for your help.
Androphp
S3 licensed
Quote from Yisc[NL :;2080328"]Have a look at this message: https://www.lfs.net/forum/thread/93714

I can successfully send data from the PHP section, send globalmsg etc., but when it comes to printing the request from http with if in the lapper, it fails.
Androphp
S3 licensed
The value of the $allowed variable returns a $allowed variable from PHP with the data sent to you from http, but I don't understand where the problem is. I'm waiting for your results when you test.
Androphp
S3 licensed

Sub SendWebRequest($userName)
privmsg("Send webrequest");



$allowed = http("http://localhost/testscript.php?u=".$userName);

IF($allowed == 0)
THEN
cmdLFS("/kick ".$userName);
GlobalMsg("Kicked: ".$userName.". Reason: Not Alowed");
ELSE
GlobalMsg("Welcome Back: ".$userName);
ENDIF



EndSub

I tried it this way too, but I only get one result from the if, when I change the value the result is always the same.
Androphp
S3 licensed
Quote from Bass-Driver :What if you try to rename the sub.
Because the http() function has the same name as the sub.

Actually, something different is written in that section in my own code. I changed it while writing the code in a hurry. Normally, it was called Sub verify, which means I don't have any problems redirecting to the sub, but for some reason, there is a problem with the if value.
http code support
Androphp
S3 licensed
script.php

<?php

$allowed_list = array(

"TechEdison" => "yes",
"Androphp" => "no"

);

$username = $_GET["u"];

if($allowed_list[$username] == "yes")
{

echo '$allowed = 1;';

}
else
{

echo '$allowed = 0;';

}

?>

LFSLapper.lpr



Sub verify($userName)

http("http://localhost/script.php?u=".$userName);

IF($allowed == 0)
THEN

cmdLFS("/kick ".$userName);
GlobalMsg("Kicked: ".$userName.". Reason: Not Alowed");

ELSE

GlobalMsg("Welcome Back: ".$userName);

ENDIF

EndSub




CASE "!test":
verify($userName);
BREAK;


Hello developers, I had the opportunity to try these codes today and I tried them. But I am encountering a problem here, let me state the problem right away. First of all, I don't get any errors, but I think I did something wrong somewhere, but I couldn't figure it out. I'm starting to explain, I ran the codes on my localhost, I have a script.php file, but I couldn't print the values ​​coming from there to the lapper with if. To elaborate, let's assume that I did not define $allowed in the if else values ​​in PHP, and I added 2 GlobalMsgs to the if and else parts where $allowed is written. If the value is yes, it sends me a Value: 1 msg. If the value is no, I set the value: 0 to a GlobalMsg via PHP. In this case, I get the correct value, but when I put $allowed value in php and want to send GlobalMsg to the lapper with if, the $allowed value from php always sends the same message whether it is 1 or 0. I think I have a problem with the if writing in the lapper section, I couldn't solve it. It would be nice if people with knowledge on this subject could help me. Good work to everyone.
Last edited by Androphp, .
Androphp
S3 licensed
We are not continuing the topic because the issue has been resolved.
Androphp
S3 licensed
Quote from Bass-Driver :@RealistAdam.

Made a new small changes and tested it. The code below is working.
I've changed the 2 IF statements in a different order.

CASE "!jrr":

$X_Axis = getcurrentplayervar("X"); #X axis SpawnPoint
$Y_Axis = getcurrentplayervar("Y"); #Y axis SpawnPoint
$Z_Axis = getcurrentplayervar("Z"); #Z axis SpawnPoint
$Flags = 128; #Move/Reset car (128) else (0)
$Heading = 0; #Heading of the players car at Spawnpoint
$UCID = 0; #Connection's unique id (0 = host)
$PLID = getcurrentplayervar("PLID"); #Player's unique id
$JRRAction = 4;

IF(GetPlayerVar($userName,"OnTrack") == 1)
THEN
IF ( GetCurrentPlayerVar( "InstantSpeed" ) < 1 )
THEN
$Message = " ```fix\n (". GetCurrentPlayerVar("UserName").") aracını yeniledi. >> (". GetLapperVar ( "LongTime" ) .") ``` ";
$DiscordChannel = "1206604043112157214";
sendmessagetodiscord($DiscordChannel,$Message);
privMsg( GetCurrentPlayerVar("NickName") . " ^7Araç yenileme başarılı.");
joinrequest($X_Axis , $Y_Axis , $Z_Axis , $Flags ,$Heading , $UCID , $PLID ,$JRRAction); #Send Data to LFS
ELSE
privmsg("^3Command abort: Stop the car!");
ENDIF
ELSE
privmsg("^1You cannot use this command in spectatormode");
ENDIF
BREAK;

The incorrect order of IF statements can cause headaches.

Although the location of the ifs may not cause problems sometimes, it would be better to have the if order correctly for the priority of the operation, I agree with you here.
Androphp
S3 licensed
When building Lapper, try to write code yourself instead of using ready-made codes. Ready-made codes that you have no idea how they work will force you to get more errors.
Androphp
S3 licensed
I had a very bad computer at the time and the server was crashing and freezing after the players left the pit. I think the problem is related to the storage of your computer.
Androphp
S3 licensed
You have no choice but to check the codes you have changed recently, check the OnConnect event in the error. and stop changing lapper version constantly, every code data you make may not be available in old versions.
Androphp
S3 licensed
It is definitely obvious that the problem is here, check this, most likely the discord bot. You cannot use every discord code we have used in every version of the lapper, use the most up-to-date version of the lapper.
---------------------------------------
1/31/2024 4:18:36 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #14
1/31/2024 4:18:36 PM -> Var not defined on file: ".\default\.\includes\.\myInc.lpr" at line #15
Androphp
S3 licensed
What do you think is bad about asking questions or trying to get information? And I don't care about anyone, young or old, I just focus on what I want to do. Do you think only young people are involved in these things?
Androphp
S3 licensed
Is the fact that my account has been newly created a sign for Generation Z? I'm only asking questions because I have no knowledge about the subject. After all, it's not something I do. I chose VSCode to do collaborative work at the same time, but it doesn't work for me.
Androphp
S3 licensed
I'm more used to visual studio. Is there another way to add color codes?
Visual Studio Theme
Androphp
S3 licensed
Hello Bass-Driver, I have a question to ask you, I have been using notepad++ for lapper for a long time and it is starting to get boring. Can you release a plugin or something like that so that we can open .lpr files in visual studio and color them so that our projects are organized?
Androphp
S3 licensed
I have encountered similar JOOS errors before and I will give you a few reasons based on my experience. First of all, such errors occur if the data in the server's main files do not match the user's, for example, the XR vob file is recorded in the server data, but if the user himself changes the vob file of the XR tool and tries to make a mod, he may have problems entering the server. Secondly, 3rd party software used may cause these errors, such as the ones you use, Crash, Tweak, etc. Software may cause problems for you when entering the server. In general, JOOS errors may be user-related problems if the server files are original. They may have probably made a few changes to their own files or done something wrong. Ask them to reset their game and log in to the server again. This will minimize the analysis to understand where the problem originates. Thirdly, the internet connections of the people connecting to the server may cause some factors, I do not know how true this is. Fourthly, installing 3rd party software on the server may cause these errors. Read and analyze above carefully, make sure that you are running the game in its most original form, if the problem still persists, Live For Speed ​​developers will help you.
Androphp
S3 licensed
It's a very accurate observation, I agree with you 100%, I think he needs to be left alone with his problems now.
FGED GREDG RDFGDR GSFDG