The online racing simulator
Searching in All forums
(98 results)
MERSOLES STROLEN
Androphp
No longer welcome
Vehicle mod: MERSOLES STROLEN
Details page: https://www.lfs.net/files/vehmods/DD6469

SHORT DESCRIPTION:
Quote :Mersoles Family Van

DESCRIPTION:
Quote :Mersoles Family Van
Good Car
Van

COVER SCREENSHOT:
Androphp
No longer welcome
Thanks for the new version it works better now.
Androphp
No longer welcome
Hello, in your last update, our problem with Leave Zone was solved, but I think you tampered with the http() related codes because almost many of our http() codes do not work. Can you please tell me which codes we need to fix from version 9.4 just for the changes related to Leave Zone?
Androphp
No longer welcome
I have no knowledge on the subject and I will only offer a suggestion based on what I have read. It is up to you whether you do it or not. If users could open their own servers from their own hosts, everyone's ping or connection problems would be related to themselves and server flows would be more comfortable, just like we open our own user systems on our own hosts. So how will this be related to the pricing part? I have the following idea: Among the server files, a verification code can be sent to the user by lfs.net when the server is started, and this code only works when used on the registered hosting server, just like in the user system. In short, a person can purchase an API for the server and this API can be used as a key in the server files. To make it more secure, the verification code may be included as I mentioned above. Good luck in your development process. Or, to solve the problem better, it would be better for everyone to use only the "NL" host and other locations are a waste of time for you.
Androphp
No longer welcome
Quote from batuhan2774 :Hello Developers...

I don't have any information about the error you receive, but I can say something to help you: You need to add the IP address of the lapper client you want to connect to from your lfs.net site to your servers section.
Androphp
No longer welcome
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
No longer welcome
Nobody sells something like this
Androphp
No longer welcome
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
No longer welcome
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
No longer welcome
Quote from moujuqalbi :androphp dc var mı

andro.php
Androphp
No longer welcome
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
No longer welcome
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
No longer welcome
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
No longer welcome
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
No longer welcome

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
No longer welcome
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
No longer welcome
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
No longer welcome
We are not continuing the topic because the issue has been resolved.
Androphp
No longer welcome
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
No longer welcome
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
No longer welcome
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
No longer welcome
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
No longer welcome
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
No longer welcome
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
No longer welcome
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.
FGED GREDG RDFGDR GSFDG