The online racing simulator
Searching in All forums
(279 results)
Popughini
S3 licensed
No, I always check when I put it on ;

Thanks for your answers, I'll try the Bass-Driver code again!
Popughini
S3 licensed
I can not configure it, could you explain a little better please?
Popughini
S3 licensed
Quote from Bass-Driver :Post your code!!! , we cant help you with this.

Use the code you gave me
Popughini
S3 licensed
Quote from Bass-Driver :Few examples with explanation:

Create a button:
openPrivButton( "lang_en",30,30,4,4,5,-1,32, "^3EN" ,SetLanguage);

When the player click on the button it calls a sub named 'SetLanguage'.


<?php 
Sub SetLanguage
$KeyFlags,$ButtonID  )
   
#Cut the first 5 chars of the buttonID , result = 'en'
   
$language trimsubStr$ButtonID,) );

   
#When the value/string of $language is equal to 'en'
   
IF($language == "en")THEN
      SetCurrentPlayerVar
("IdLang","en"); #Set player language to English
   
ENDIF
EndSub
?>


Create a button for the LFSLapperlanguage_engine
openPrivButton( "example",75,111,50,10,5,-1,ISB_DARK, langEngine("%{example}%"));

To define "example" in english.

Lang "EN"
example = "This text is an exampletext";
EndLang


7/25/2017 4:31:58 AM -> Syntax error in cfg file ".\default\SISTEMAS.lpr" at line #193
';' needed
Function 'setlanguage' script aborted
Popughini
S3 licensed
Quote from Yisc[NL] :Although the error suggests that a semicolon is missing, which can be the real problem in some cases, that same error is also given when an empty value is inserted, which causes "" get together and is read as a closure of a piece of code.
Add this to your code and see what is actualy written on the console of Lapper:

writeline ( "Distancia_" . $track . "_" . $car . "_" . $username );

Thank you very much for replying, another inquiry ...

To get the distance from the GetStoredValue, is this line okay?

<?php 
openPrivButton
"distancia3",47,0,15,5,5,-1,32,"^7Distancia total: ^6"GetCurrentPlayerVar "Dist" ),"" );
?>

Popughini
S3 licensed
Thanks Bass-Driver!
Popughini
S3 licensed
Quote from Racon :Add a semicolon (';') to the end of line 157. (Your error says line 158, but generally when missing a semicolon it is the line before that has one missing)

This is the error line


<?php 
GetStoredValue
("Distancia_" $track "_" $car "_" $username$Dist);
?>

Popughini
S3 licensed
I have this error in the log


<?php 
7
/20/2017 5:31:02 AM -> Syntax error in cfg file ".\default\SISTEMAS_TWEAK.lpr" at line #158
    
';' needed
    
Function 'onconnect' script aborted
?>


Popughini
S3 licensed
I use it that way but it did not work


<?php 
Event OnConnect
$userName # Player event
    
GetStoredValue("Distancia_" $track "_" $car "_" $username$Dist);
EndEvent
?>



<?php 
Event OnDisConnect
$userName$reason # Player event
    
SetStoredValue("Distancia_" $track "_" $car "_" $username$Dist);
EndEvent
?>



<?php 
Sub nodoetc
$KeyFlags )
openPrivButton"distancia3",47,0,15,5,5,-1,32,"^7Distancia total: ^6"GetCurrentPlayerVar "Dist" ),"" );
PrivDelayedCommand1nodoetc );
EndSub
?>


Popughini
S3 licensed
It would be something like


<?php 
SetStoredValue
("Distancia_" $track "_" $car "_" $username$Dist);
?>

Popughini
S3 licensed
I have no idea how to do that, since I never use the storedvalue :/
Popughini
S3 licensed
How do I do that? :S

Thanks for answering Yisc[NL]
[Solved] Save/Get driven distance from database
Popughini
S3 licensed
Hi, I would like to ask you for help since I do not remember how to do so that the total distance that the user has running on the server appears, only shows me a distance that when I close LFSLapper is restarted, what I want is for the distance to count the total That the user takes on the server

This is my code

<?php 
openPrivButton
"distancia3",47,0,15,5,5,-1,32,"^7Distancia total: ^6" Round(ToNum(GetCurrentPlayerVar"KM" ) + GetCurrentPlayerVar("TotDistMeter") / 1000 ),1));
?>

Thanks in advance!
Last edited by Bass-Driver, .
Popughini
S3 licensed
Quote from kristofferandersen :Its been 5 years since this one was released, its time to move on.
DarkKostas made a template of InSimDotNet insim in the InSimDotNet thread if you need something to start with.

Thank you very much for replying, I will see what I can do with the example of DarkKostas
Popughini
S3 licensed
So then neither of the published insim works?
Popughini
S3 licensed
The program crashes and this says in the debug


<?php 
Thread 0x14a8 ended with code 0 
(0x0).
'LFS External.vshost.exe' (CLR v4.0.30319LFS External.vshost.exe): 'E: \ COMPU \ LFS \ SERVERS \ [Redexx] Cruise Source - copy (2) \ bin \ Debug \ LFS External. Exe 'loadedSymbols loaded.
'LFS External.vshost.exe' (CLR v4.0.30319LFS External.vshost.exe): 'E: \ COMPU \ LFS \ SERVERS \ [Redexx] Cruise Source - copy (2) \ bin \ Debug \ LFS_External.dll ' loadedSymbol loading was omittedThe module is optimized and the 'Only my code' debugger option is enabled.
'LFS External.vshost.exe' (CLR v4.0.30319LFS External.vshost.exe): 'C: \ Windows \ Microsoft.Net \ assembly \ GAC_MSIL \ System.Configuration \ v4.0_4.0.0.0__b03f5f7f11d50a3a \ System. Configuration.dll 'Symbol loading was omittedThe module is optimized and the 'Only my code' debugger option is enabled.
The 0x179c thread terminated with code 0 (0x0).
The 0x16e8 thread terminated with code 0 (0x0).
The program '[504] LFS External.vshost.exe' terminated with code -1073741819 (0xc0000005'Access violation'.
?>

Popughini
S3 licensed
Enter [Redexx] Drag Server and you will see the progress

And I guess for something this throws this section and the help section
Popughini
S3 licensed
I paid 5 dollars via PayPal to help me run an insim.
Popughini
S3 licensed
Thanks, but I need editable PSD, to change the name
Popughini
S3 licensed
I already use it, but it does not work for me, it does not save the IP addresses
[REQUEST]IP Saving
Popughini
S3 licensed
Hi, I would like to know if there is any way that when a user connects to the server, the user and the IP address of the user are automatically saved in a .txt file ...

If anyone could help me with that script I would be grateful!
Popughini
S3 licensed
How can I open the .dbs files and view their contents?
Popughini
S3 licensed
I have tried the code to block the IP connection but it does not work, putting the IP in the .txt file does not throw the user who connects with that IP
Popughini
S3 licensed
Yes but I do not get the logo, I tried but it does not come out
Popughini
S3 licensed
I want the same design but in PSD to edit the names
FGED GREDG RDFGDR GSFDG