The online racing simulator
Searching in All forums
(473 results)
MaKaKaZo
S2 licensed
Thanks guys for all your replys. You are proposing solutions that, honestly, are not worth the effort for this matter. I mean, I'd rather use some basic hex editor to cut the mpr file header manually and upload it than try any of the things you propose.

After talking to my project-mate I'm going to do some research about a new approach, that would be to upload the results automatically into the MySql DB via insim. I already have some insim applications handling data from the DB, I just have to take a look into the available packets to see if it is reasonable to try and do it that way, which would be in my opinion the coolest solution to the problem of uploading results, to have them upload themselves automatically through the insim application that will be used to control the races.
PHP question - partially uploading files?
MaKaKaZo
S2 licensed
Hi, I'm doing some work on a new league project and I've come to uploading results.

My initial idea is to get the results from the mpr header. I have already done that, using an hex editor to extract just the header. But now I'm wondering if there is a way to upload a file partially using PHP, or opening it directly from my local machine. This way I don't have to upload a full mpr file which can be several MBs big, or edit it with any software to extract the header.

So, the main idea is to be able to parse the mpr file header without having to upload it completely. Any help?
MaKaKaZo
S2 licensed
Let's hope Victor sees this Nice catch Dygear
MaKaKaZo
S2 licensed

Fun Racing League
June 2010
20100601 Round 1 with FBM at AS3R
1930 Qualifying for 15 mins
1950 Race 1 for 13 laps
2020 Race 2 for 13 laps
20100608 Round 2 with FBM at SO6R
1930 Qualifying for 15 mins
1950 Race for 45 laps
20100615 Round 3 with FBM at WE1
1930 Qualifying for 15 mins
1950 Race 1 for 14 laps
2020 Race 2 for 14 laps
20100622 Round 4 with FBM at BL1
1930 Qualifying for 15 mins
1950 Race for 41 laps

All times are in UTC.

First of all, sorry for posting this late. The first event (Round 1) was held yesterday night and we realized we hadn't submitted this trophy info when we were about to upload the replays. GreyBull [CHA] is who usually submits this info but he couldn't help us for this trophy and we forgot that this had to be done by another person!

Also, I'd like to have access to uploading replays for FunRacingLeague if possible. What would I have to do?
MaKaKaZo
S2 licensed
Quote from RenvoN :Yea, well, when you send a message through remote, it appears as "host: whatever message"... so I wanted to control the race through remote also, 'cause the race director might be somewhere where there is no lfs installed or something, then he could still control the race through remote.

anyway, i edited my original post with the solution for this if anyone else needs it

Ha! I didn't know the messages sent via remote were host chat messages

Well, you found the solution and I'm glad you took the time to read the code. You're lucky I wrote a case for host messages to be ignored, as that is easily recognizable. I think there's no particular reason to ignore host chat commands in this application in particular, as none of them take info from the player who uses the command.

I'll make the changes you propose, but consider that you also have to change the following line (1348):

// These commands can be executed only by admins
if (ginfo->players[i].Admin)

Change to:
// These commands can be executed only by admins
if ((ginfo->players[i].Admin) || (pack_mso->UCID == 0))

You have to change this too to be able to use the commands !eon, !eoff and !eexit, which are only available to host admins and not to race directors. I consider that an admin connecting via lfs remote has enough rights to use these commands.
Last edited by MaKaKaZo, .
MaKaKaZo
S2 licensed
Quote from RenvoN :Hey dude,

What should I change to let someone use commands on remote?
I mean, the "host" is dedicated, so it does not have a license name...
I tried to use an empty strcopy on the code but as you might know, it did not work.

Thanks!

I'm not sure I get what you are trying to say. Are you trying to use EC commands on lfs remote, the flash application? In that case I'm quite sure that can't be done (only if you have admin password and I'm not sure what commands are available in that case). You can only use EC commands if you are directly connected to the server.

If you want drivers connected to the server to use commands, you have to edit the config.cfg file and add their license names using "/director=license_name". You can add up to 50 directors.
MaKaKaZo
S2 licensed
PoVo, to use this library I think you need to have a more proactive attitude towards programming.

First of all read the insim.h file, which contains the structs I use. It's the original insim.txt file in the "...\LFS\docs" folder converted to a header file. There you will find explanations on all packets and their fields, including buttons of course.

Then go to any of my examples and look in the main.cpp for code where button packets are created. That is, look for "ISP_BTN". If you don't understand what is going on there then please don't ask again about it, because all I'm using are functions included in standard C/C++ libraries and basic C/C++ features, and you should be able to understand all of that by yourself (or be able to look it up in any C++ reference manual yourself).
MaKaKaZo
S2 licensed
In case you just want to show the date and time for a brief moment then you just create a button and use the appropiate function to retrieve date and time.

If you want it to be updated so it's continuously showing the time, then you have to create a separate thread to act as a timer. That thread, in a loop, updates the text in the button and then sleeps for 30 or 60 seconds (or less, in case you want to update by minutes, depending on the acuracy you want), or 1 second (if you want to update each second).

The thread repeats that in a loop until it receives some kind of signal to stop and finish its execution (to avoid an endless loop). I guess using a global variable would be the way I would do it, but probably the pthreads library adds some kind of mechanism to communicate threads. You can use the pthreads library that I have been using in my examples. You can grab the "Event Control" example application (first post) and have a look at the code. I use threads there for timers, to erase buttons after a certain amount of time.

Anyway, I'm not a good programmer and I'm not thinking this very thoroughly...
MaKaKaZo
S2 licensed
Why do you need to know which director is writing the message? I did it like this on purpose so racers don't know who is writing the messages. All messages come from "DIRECTOR" so it looks like there's only one official director.

Right now I don't like the idea of changing it.

If your admins are non racers just make them change their names to capitals in red and use the regular chat.
MaKaKaZo
S2 licensed
He received the extra unlock and everything is working ok now. Thank guys for pointing me to the mail thing, I hadn't thought about that.
MaKaKaZo
S2 licensed
And that's a shame, that some banners might lead to broken links if they are not checked from time to time, while other sites running can't have a banner.

Anyway, looks like a busy period for the devs to be asking this kind of thing
MaKaKaZo
S2 licensed
Don't mind the haters, it's not their word that the devs are going to listen to when it comes to suggestions. All suggestions are welcome.

Anyway, the current WE is a very peculiar track, and it's very different from the rest of the tracks. It was meant to be like this, a fast track with a lot of fast corners.

Your idea is not bad at all, but the thing is not changing the current Westhill, but adding new track configurations. The classic WE must reamin unchanged, but sure they could add a couple of variations.

They could add an "F1 like" config by adding a couple of slow corners like the one you proposed, or even a slow chicane. Would it change the spirit of the track? Partially, the key would be keeping some of the very fast corners and adding a couple of strong braking points.

Also a shorter version would be nice, but I can't think of anything right now.

I think it's a shame that Westhill only has one possible config. I'd like to see a couple more with slightly different flavours, but always keeping the fast flowing spirit of it.
S2 license unlock problem
MaKaKaZo
S2 licensed
Hi, I'm writing on behalf of S2 username "d-ani", who can't write in English.

He lost all his unlocks last friday. When he tried to join a multiplayer host the master server asked him to update to Z28 and unlock. Later that day the same thing happened, and later it happened again, so he used all three unlocks in one day.

I've been asking him through ventrilo and it looks he had changed the name of his Z25 executable to another name, not LFS.exe, and he was using a shortcut to that executable all the time. I think the update and unlock might have been effective to a new LFS.exe that was being created, but he wasn't using it when he launched the game. Could this cause the problemn mentioned above? We want to clear that up so next time he unlocks it stays permanent.

We have cleared the "read only" attribute for the whole LFS folder, and we have tidied up all the LFS executables he had. He now has only one LFS.exe which is Z28, but it's locked.

Could he please get a new unlock or does he have to wait until friday?

Thanks in advance.
MaKaKaZo
S2 licensed
I don't want to pop the bubble, but I'm actually more interested now in the other suggestion, the setup storage one (basically because timing has been already deeply discussed).

For someone who has been active for a couple of years it's very common to have tons of setups for every car. I really like the idea of allowing subfolders into the setups folder so we can have them sorted as we like. We could create folders to our desire in "{LFS}\data\setups", and then in the car setup screen we would see:

- Relative path showing the current folder.
- An entry for the parent folder ("..")
- Folder names on top with a different font colour.
- Setups contained in the current folder.

When you create a new setup it is stored in the current folder.
MaKaKaZo
S2 licensed
Quote from Neto_r :awesome work friend


other thing!

it is possible to make 3 qualy? like in the F1? Q1, Q2, Q3, without restarting the qualy 3 times?


where is the diff between Soft and Hard qualy?

regards

It is possible to do almost anything, but at the moment I'm not going to do a F1 based qualifying system, maybe in the future. Anyway, if it's done, the correct way would be to restart quali 3 times.

Soft quali is the standard way: people are free to join or leave the track at all times. Hard quali is the realistic way: once you exit the pitlane you can't enter boxes (shift+p) or spectators (shift+s), you can only drive into the pits and stop on the yellow spots so you can change tyres, refuel and do setup modifications allowed by the F12 menu.
MaKaKaZo
S2 licensed
Quote from RenvoN :IS_MTC - only for multiplayer hosts
IS_MTC - only for multiplayer hosts
IS_MTC - only for multiplayer hosts

I am getting this when i type !ecmd, but everything works fine... dunno if it's a bug or something

That is because you are connecting it to your local LFS instance, instead of connecting directly to the server. The application is server oriented, so the correct way is to connect it to the LFS dedicated server using its IP and insim port (which must be open, of course). It's intended to be kept running in the server all the time, and you can turn it on or off whenever you like.

If you connect to a local instance of LFS some things may not work. For example, IS_MTC is a "message to connection" packet, and can only be used if you are directly connected to the host. I've looked and currently I only use it in one place, to send a welcome message when a player connects ("^3Welcome! ^6Event Control v0.41 ^3is active"), so that's not going to be a problem at all, it won't make the application crash or cause any trouble. You can look for that in the code and put it into comments tags "/* */" (and recompile, of course). Even there's a bigger screen sent to all players when they connect, so that message isn't very useful at all.

Anyway, I'm not sure if that's the only "problem" you are going to find.


Quote from RenvoN : EDIT: Almost forgot to thank you for releasing this to the public, especially because you published the sources so we can adapt this tool to our needs.

That's the idea
MaKaKaZo
S2 licensed
Quote from Neto_r :exc

i try it, and works exc


just one thing

it is possible that the race directors can put the penalizations via any command? like drive trought, stop and go? 30segs? 40 segs?

regards !!!

DONE! Check for the newest update. I have added penalties commands and RCM commands.

Quote from misiek08 :It is possible without it. /p_sg, /p_dt commands

You're not getting the point of this tool. It's meant for race directors, who are drivers that access the server with the normal password, not the admin password. These race directors are granted permission to use some commands to restart a race/quali, change track, cars, weather, wind... etc.

The race director is usually a driver appointed by the league admins who has enough experience and credibility to use these commands in a right way to direct the course of the race. This is useful when you are running a multi-pool league and in some pools there aren't any admins present to control when the race should start/end, etc. That's the work of the appointed race director.

For more info, read the first post, specially the USAGE AND FEATURES part, where you can find all available commands for the different levels of users.
MaKaKaZo
S2 licensed
New update! Event Control v0.4:

- More commands available for race directors (so they can tackle several situations concerning basic race configuration).
- Event Control can be turned on or off using admin commands.
- Configuration files merged into just one.
- It uses the safer CInSim library v0.4
MaKaKaZo
S2 licensed
New update! Event Control v0.4

- More commands available for race directors (so they can tackle several situations concerning basic race configuration).
- Event Control can be turned on or off using admin commands.
- Configuration files merged into just one.
- It uses the safer CInSim library v0.4
MaKaKaZo
S2 licensed
I have updated the CInSim library to a new version v0.4. This new version now uses pthreads-w32 to achieve thread-safe sending. Previously the programmer neede to use some kind of mutual exclusion checking so several threads didn't use the send_packet( method at the same time. Now the library does this checking.


Also, Event Control has been updated again with new features and it's the first CInSim application to use the version 0.4 of the library.
MaKaKaZo
S2 licensed
Quote from yankman :I've updated insim.txt, so code description as well as general usage description is now being parsed by doxygen (see here).
The zip file includes the changed insim.txt (ispackets.h).
Maybe this can be added to the wiki (although I got no idea how).

I still don't see it very useful. The info that I look for the most in insim.txt are the structs of the different type of packets to see their fields and what they mean, and I can't find that in the doxygen generated html
MaKaKaZo
S2 licensed
I thought about doing this too about two years ago when I started with insim and also ruled it out because of the maths involved that you have mentioned. There's just not enough buttons, and I was basing my design on the basic live timing that www.formula1.com offers for free to subscribers during F1 events, which doesn't include top speed data. (http://www.formula1.com/live_timing/)

Anyway, the best idea would be to do it as a web application, like an alternative to lfs remote. The original live timing by F1.com is a Java application, but I guess using PHP/ajax something very similar could be done. I'm not a good web programmer so... maybe I'm talking nonsense
MaKaKaZo
S2 licensed
The previous examples were not very useful, this one is small but works well and we are indeed using successfully it at the FRL. I guess I'll keep sharing everything I do related to InSim because I don't like having to write code and contributing to the community is always good.

I hope someone tries this for some league. Feedback would be welcome.
MaKaKaZo
S2 licensed
Qual Control has now been updated and changed to Event Control.

Also, there's a new version 0.31 of CInsim, which includes all changes made to insim as of LFS S2 0.5Z28. The previous version v0.3 was done in 2008, so it had to be updated
MaKaKaZo
S2 licensed
Not to bump the thread, but I have updated this application from Qual Control v0.2 to Event Control v0.31.

Now it does more things aside from managing hardcore qualifying sessions. Read the updated first post for detailed info and download link.
FGED GREDG RDFGDR GSFDG