The online racing simulator
Searching in All forums
(884 results)
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Small Scriptupdate:

-Added Saving/Delete Locations and tested with many drivers in the server.
-Only the saved locations for the current track will be loaded.
-Saved Locations will be saved in a textfile.

Looks like this inside the textfile:


bl1|bridge|-86|-264|0
bl1|sdads|-99|154|10
bl1|pitbox|-100|155|10
bl1|sadasd|-99|154|10
bl1|test01|1|322|0

Things todo:

-Working Deletebutton
-Few protections against spawning spectating players or spawning players without any valid X/Y/Z axis (will be updated in the sourcecode later)
-Display more than 14 locations and 16 players
Spawnsystem
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Update:
Creating a script to spawn players easily.
It is not finished yet. But the basics are working well.

At the moment i'm working on Set/Save locations to spawn the current player to that location.
See the attachment for the current state of the GUI.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Update:

Here is the first testversion that includes the JRR insimpacket:


The commands+Info can you find in the LFSLapper.lpr file.
For now i only want to test the reset function of this JRR packet.


<?php 
#########################################################
        #JRR Command Info:
        #########################################################
        
        #########################################################
        #########RESET YOUR CAR (with or without repair)#########
        #########################################################
        
        
Set $Flags 128;
        
Set $UCID 0;
        
$PLID getcurrentplayervar("PLID");  #PLayer's unique ID
        
or
        
$PLID players id here;  #PLayer's unique ID
        
To see your PLID type !plicid
        
        
If you want to reset your car on your current position:
        
            
$X_Axis getcurrentplayervar("X");      #X axis SpawnPoint
            
$Y_Axis getcurrentplayervar("Y");        #Y axis SpawnPoint
            
$Z_Axis getcurrentplayervar("Z");        #Z axis SpawnPoint
        
ELSE
        
            
$X_Axis 0;      Fill in the X coordinate
            $Y_Axis 
0;      Fill in the Y coordinate
            $Z_Axis 
0;      Fill in the Z coordinate
            You can drive to a location 
and type !zone to see the coordinates of that location
            
        $JRRAction 
4; = Reset with repair
        $JRRAction 
5; = Reset without repair
        
###################################################
        
*/
        CASE 
"!jrr":
            
privmsg("Test JoinRequest");
            
$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;
                
            
joinrequest($X_Axis $Y_Axis $Z_Axis $Flags ,$Heading $UCID $PLID ,$JRRAction); #Send Data to LFS
        
BREAK;
        CASE 
"!plicid":
          
privmsg("Your UCID: ".getcurrentplayervar("UCID"));
          
privmsg("Your PLID: ".getcurrentplayervar("PLID"));
        BREAK;
        
###################################################
?>

Other Fixes/Changes in this version:


+-------------------------------+
|Changes from 7.0.4.1 to 7.0.4.2|
+-------------------------------+
1. New Function: joinrequest(); JRR Insimpacket

2. Changed:

Characterlenght increased to 120 chars instead of 67 for the following functions:
Privmsg();
GlobalMsg();

3. Fixes:
#########
Fixed Typo's & Changing Pitworks in sourcefile Insim4.cs ( Thanks to Iceman121 for reporting the typo's and idea's)

-Mechanicals Damages >> Mechanical Damage
-Body Dammage >> Minor Damage
Major Damage

-Refuel >> Refuelling
-Wheels & Transmissions >> Wheels
#########
Sourcecode bugfix: in GLScript.cs ( Thanks to Yisc[NL] for reporting the bug)
Link of report: https://www.lfs.net/forum/post/1906238#post1906238
#########
Sourcecode bugfix (CSC) (CarState Packet) implemented in version 7.0.4.1
LFSLapper crashed after getting player without a username (HOST)
#########
Minor bugfixes in LFSLapper.lpr ( Thanks to Yisc[NL] for reporting the bug)
Link of report: https://www.lfs.net/forum/post/1906123#post1906123

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Well i'v fixed it yaay

I did the Short to 2 Bytes conversion wrong.

Was

<?php 
//Convert Short X into 2 bytes
packet[8] = (byte)(>> 8); //Shift by 8 bits
packet[9] = (byte)(255);
//Convert Short Y into 2 bytes
packet[10] = (byte)(>> 8); //Shift by 8 bits
packet[11] = (byte)(255);
?>

is now

<?php 
//Convert Short X into 2 bytes
packet[8] = (byte)((16) & 255);
packet[9] = (byte)((16) >> 8); //Shift by 8 bits
//Convert Short Y into 2 bytes
packet[10] = (byte)((16) & 255); 
packet[11] = (byte)((16) >> 8); //Shift by 8 bits
?>

Infosource: http://stackoverflow.com/quest ... t-between-short-and-bytes

So when i want to X= -95 and Y= 157 , i multiply it with 16 and tada it works.

Now that works, lets play further with this packet.

@Cargame:Thank you for helping
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Sending a 1 for X-axis or Y-Axis = 16 ingame. So 2 is 32 etc.

So i thought to change the code with dividing the sending X/Y axis values by 16, gives me the next result.


<?php 
//Convert Short X into 2 bytes
packet[8] = (byte)((>> 8)/16); //Divide by 16
packet[9] = (byte)((255)/16); //Divide by 16
//Convert Short Y into 2 bytes
packet[10] = (byte)((>> 8)/16); //Divide by 16
packet[11] = (byte)((255)/16); //Divide by 16
?>

Sending 0 to 15 for X/Y axis displays 0 for X/Y ingame. But sending 16 displays 16 ingame ( which is good right), but sending 17 - 31 Displays still 16 ingame.


Input X/Y Axis >> Output

0-15 >> 0
16 >> 16
17-31 >> 16
32 >> 32
33-47 >> 32
48 >> 48
etc

The heading packet (packet[15]) seems to work fine.

I have a question about the ZByte Packet (Packet[12]). When i send ZByte = 4 i should spawn in the air?( i know, i will fall down to the track). Because the Height of the spawnplace is 2. But i get spawned on the track. Does it work this way or is this also wrong?
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
I know i'm a bit to late with adding the JRR packet.
Its just because the head developers: Gai-Luron and Krayy stop theire development of LFSLapper. So i thought to update the LFSLapper library with adding new insimpacket(as a noob programmer). I've managed to add 4 new insimpackets with succes and now i'm trying to add the JRR packet.

I red those posts yesterday , i'v used the search option on this forum and searched for "JRR". But non of those posts could help me.

So that why to asked for help.
Anyway,Thank you to give me those links. Could be handy for the future.
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Update:

It doesnt go well and i might need help from a another programmer.

Let me explain.

It doesnt spawn my car to the right position, after sending the position where i want to get spawned.
I send my position to LFS with the following script:


<?php 
$X_Axis 
1;      #X axis SpawnPoint 
$Y_Axis 1;      #Y axis SpawnPoint
$Z_Axis 0;      #Z axis SpawnPoint
$Flags 128;      #Move car (128) else (0)
$Heading 30;  #Heading of the players car at Spawnpoint
$UCID 0;       #Connection's unique id (0 = host)
$PLID getcurrentplayervar("PLID");  #Player's unique id
$JRRAction 5;  #Type of action. Reset without repair
            
joinrequest($X_Axis $Y_Axis $Z_Axis $Flags ,$Heading $UCID $PLID ,$JRRAction); #Send Data to LFS
?>

This function will be executed in the sourcecode of LFSLapper

<?php 
public void joinrequest(GLScript.unionVal valArrayList args)
{
//short X, short Y, byte Zbyte, byte Flags, byte Heading, byte UCID, byte PLID, byte JRRAction
byte[] jrr myEncoder.JRR(short.Parse(args[0].ToString()), short.Parse(args[1].ToString()), byte.Parse(args[2].ToString()), byte.Parse(args[3].ToString()), byte.Parse(args[4].ToString()), byte.Parse(args[5].ToString()), byte.Parse(args[6].ToString()), byte.Parse(args[7].ToString()));
insimConnection.Send(jrrjrr.Length);
}
?>

This code send the data to the JRR packet:


<?php 
public byte[] JRR(short Xshort Ybyte Zbytebyte Flagsbyte Headingbyte UCIDbyte PLIDbyte JRRAction//Join Request Reply - send one of these back to LFS in response to a join request
        
{
            
byte[] packet = new byte[16];
            
packet[0] = 16;
            
packet[1] = (byte)TypePack.ISP_JRR;
            
packet[2] = 0;                  
            
packet[3] = PLID;               //Player's unique id (if zero, use UCID) // ZERO when this is a reply to a join request - SET to move a car
            
packet[4] = UCID;               //Connection's unique id (0 = host) // set when this is a reply to a join request - ignored when moving a car
            
packet[5] = JRRAction;          //JRR Action
            
packet[6] = 0;                  //Spare
            
packet[7] = 0;                  //Spare

            //Convert Short X into 2 bytes
            
packet[8] = (byte)(>> 8);
            
packet[9] = (byte)(255);
            
//Convert Short Y into 2 bytes
            
packet[10] = (byte)(>> 8);
            
packet[11] = (byte)(255);

            
packet[12] = Zbyte;             //Z Pos
            
packet[13] = Flags;             //Flags
            
packet[14] = 0;                 //Index
            
packet[15] = Heading;           //Heading

            //DebugMessages to see data for each packet (Console)

            
for (int i 016i++)
            {
                
Console.WriteLine("Packet: "" = " +  packet[i]);
            }
            return 
packet// send packet to lfs
        
}
?>

LFSLapper send this packet to LFS

In the console it looks like this:

https://www.lfs.net/attachment/145870

And when i get spawned, i type a command to see my current position

https://www.lfs.net/attachment/145873


Things i did to attempt fixing it:

-X/Y axis divide by 16 ( didnt work)
-Other bit-converters (Short > 2 Bytes) ( Didnt work)

So i hope someone can help me.
LFSLapper Adding ISP_JRR (Join Request Reply) InsimPacket
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Hi everyone,

Today i started with implementing a new Insimpacket for LFSLapper.
The Packet i try to implement is the JRR (Join Request Reply) insimpacket.

With this packet you can allow or refuse a join request from a player ( Player is allowed or not allowed tojoin the race). Also with this packet you can Spawn the players car to a differend location or you can reset theire car without repairing the damage.

The following Command/Function that you might use after releasing the first testversion of LFSLapper, should look like this.


<?php 
CASE "!jrr":
            
$X_Axis 0;  #X axis SpawnPoint
$Y_Axis 0;  #Y axis SpawnPoint
$Z_Axis 0;  #Z axis SpawnPoint
$Flags 128;  #Move 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 5;  #Type of action.
            
joinrequest($X_Axis $Y_Axis $Z_Axis $Flags ,$Heading $UCID $PLID ,$JRRAction); #Send Data to LFS

BREAK;
?>

After alot of struggling with getting data from LFS , i managed to get move my car to differend location.
I hope that the rest of the test goes well without to many errors.

UPDATE: Released testversion: 7.0.4.2 (see post 10 for changelog)




Have a nice day

Bass-Driver([DanTaco])
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Do you mean: moving/adding AutoX (autocross) objects by LFSLapper?

This isnt implemented in LFSLapper yet. This will take alot of time to implement.

I might release a new small version someday. with the following changes:

########################################################
Fixed Typo's & Changing Pitworks in sourcefile Insim4.cs ( Thanks to Iceman121 for reporting the typo's and idea's)

-Mechanicals Damages >> Mechanical Damage
-Body Dammage >> Minor Damage
Major Damage

-Refuel >> Refuelling
-Wheels & Transmissions >> Wheels
########################################################
Characterlenght increased to 120 chars instead of 67 for the following functions:
Privmsg()
GlobalMsg()
########################################################
Sourcecode bugfix: in GLScript.cs ( Thanks to Yisc[NL] for reporting the bug)
Link of report: https://www.lfs.net/forum/post/1906238#post1906238
########################################################
Sourcecode bugfix (CSC) (CarState Packet) implemented in version 7.0.4.1
LFSLapper crashed after getting player without a username (HOST)
########################################################
Minor bugfixes in LFSLapper.lpr ( Thanks to Yisc[NL] for reporting the bug)
Link of report: https://www.lfs.net/forum/post/1906123#post1906123

Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Oke after long searching i finally fixed it:

Stereoscopic 3D option was enabled in the Nvidia control panel.
Weird screencolor+message after starting LFS
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Hello,

After starting LFS i get weird color and message. Does anyone of you what this means and how i can get rid of it?

It happends when i restarted my computer today, after a (forced) windows 10 update.
I thought it was caused by Geforce Experience application, but its not.

Specs:

Intel 3930K 3.2 Ghz
Nvidia Geforce GTX680
16MB Ram.

Edit: it looks like it has been set to 3d mode somehow.
I've checked the LFS Settings and they are not set to 3d mode.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
There is not a Quick button coordinator.
You have to code it by yourself.
Here is a link about how to create buttons: How to create buttons in LFSLapper by Sinanju

And this question is not related to this topic.
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Quote from developer346 :How do I find the coordinates faster

Is this question related to this topic subject?
If so : Could you explain your question?


Minigame Update:

-Displays Guessed letters.
-Draw hanging squidward peace by peace after every wrong guess.

Things todo:
-Homewindow to set Guessed Word/Hints/category
-Button to guess the word.
-Timer
-Player/Spectator
-Set strings that contains spaces.
-Show several vars like: Wrong Guesses left/Length of word/Category/Hints etc
-Multiplayer option
Last edited by Bass-Driver, .
[LFSLapper] Minigame (Hangman)
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Hi everyone,

I got bored in LFS so i deciced to create something in LFSLapper.
My idea was to create a minigame named HangMan.

it is far from complete.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
It is not possible to get Vehicle speed with this event.


You can get your vehicle speed with:

GetCurrentPlayerVar( "InstantSpeed" );

To get your speed with a command.

CASE "!myspeed":
privmsg("My speed: ".GetCurrentPlayerVar( "InstantSpeed" ). " km/h");
BREAK;

Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
oke

but is it possible to change the "User is kicked" to "User is kicked because..........." Or a Joos-Car error
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
After enabling the message log, and updating the insim logfile system. I've got a few kick reports in the kicklogfile.
By checking the time/date in the lfs message logfile, i have found the following lines.

May 13 15:47:52 HoraDoShowPorra^L connected (105DaLeste)
May 13 15:48:00 HoraDoShowPorra^L left the pits (XRG)
May 13 15:48:30 HoraDoShowPorra^L pitted
May 13 15:48:32 HoraDoShowPorra^L left the pits (XRG)
May 13 15:48:32 Modified car - guest disconnected
May 13 15:48:33 Leave @ 1136527 : HoraDoShowPorra
May 13 15:48:33 HoraDoShowPorra^L was kicked (105DaLeste) <<< This is what other guests/admin sees in the server.

Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
..

Quote from Scawen :If you really want an answer, it would be better to explain exactly what the problem is, what program you are using, what you tried to do, how you tested it, what went wrong, what error messages were displayed.

It's really impossible for anyone to help if you give so little information.

Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Today it happends again. And there is one thing that is the same before the user get kicked from the server.
What i think it has something todo with tweak.

Because as you can see in my post #78

The user goes to the garage 2 times and get kicked after joining the track.
I have tried find the user and it has joined a tweakserver.

After 5 min i checked again and he's still in that server.

So it might be a sort of tweak/hack protection, if you do not have a modified server.

Is this is true. It whould be nice if LFS sends a message to the server. That this user is kicked for using hacks/tweaks.
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
I havent set the "message log file" and i do not have any Server logfiles to show.

Currently i'm working on a logfile system that registered every kick/ban etc. But it is not fully functional yet.
Otherwise i could give you the following info: User/date/time.
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
I'm sure it is not caused by a admin (typed or kickbutton) or by insim.

The strangest thing is , the players always get kicked when they join the race.

But when you say, that they get kicked when joining a another server. it could be possible that they run "LFSLazy" insim.
Serverlist picture
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Quote from Scawen :It may be a good time to consider this. Probably due to being busy on a lot of other things recently, I am not really aware of this issue. Can you explain why it is happening? Sorry for missing any previous explanations, but I'm listening now.

Please can you look at these possibilities, and tell me which one you think is more of a concern, and if there is another case I have not thought of?

1) Obviously it happens when a modified guest joins a non-modified host, and I have not regarded this as a big problem. I suppose in this case it would be nice if there was a more useful message to the guest, suggesting they join with an unmodified version of LFS?

2) And there is the other case when an unmodified guest (could be a new player) joins a modified host. In this case, the host should be private so this does not happen. It is of course very bad if modified hosts are publicly visible and I would have to do something about it.

It's not really easy to distinguish between these two cases but I could think a bit about it.

I'm not sure is this has anything todo with the things above.

Some players in my demoserver (not modified) getting kicked from the server when leaving the pitbox. Is this a sort of cheat/hack protection?.

Dedicated Server: Version N.
Insim on Server: (yes) (LFSLapper)
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
What i think what he means is:

He wants a script: When you change your nickname, and the new Nickname contains a [COP] Tag. That you send a cmdLFS("/cansiren " .$Username. " 1"); command
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
From what i understand from Google Translator, is that it cannot find a file.


In the attachment contains 3 files.
Copy/Paste those 3 files in the 'Bin' folder. LFSLapper V7.0.4.0\bin

Try this and see if it helps.
Last edited by Bass-Driver, .
Bass-Driver
S3 licensed
Online at :
VM.Infected Dev
Thanks Yisc[NL],
Never thought that something small like this could cause headaches.

Also i learning something new. Using dumpvar();
FGED GREDG RDFGDR GSFDG