The online racing simulator
Quote from dougie-lampkin :Doesn't it do that by default? Why make one when it's there...

Maybe he wants to grant acces to BAN without giving out the server password.

&

Yes, buttons are scaled:


The recommended area for most buttons is defined by :
#define IS_X_MIN 0
#define IS_X_MAX 110
#define IS_Y_MIN 30
#define IS_Y_MAX 170

So a button using up 1/4 of the avaliable area (which is ~110x140) will use up 1/4 of the avaliable area no matter what resolution the client has. It's really handy to make it this way for all clients to be able to use the same buttons without anyone missing out.
Ah i see, thanks
#53 - vane
exactly jason, and it will get annoying always typing in the admin pass
Umm, I've just tried to do a button, but I can't get it to work...

I've used the above example in IS_BTN, but I can't see anything in-game. I've used 255 for UCID, InSim.txt says this shows it to all connections (I've also tried using the NCN.UCID, but that won't work either). I couldn't find the line for uncommenting the Default Methods region, do I need to make one for IS_BTN?

Thanks for reading
Quote from dougie-lampkin :Umm, I've just tried to do a button, but I can't get it to work...

I've used the above example in IS_BTN, but I can't see anything in-game. I've used 255 for UCID, InSim.txt says this shows it to all connections (I've also tried using the NCN.UCID, but that won't work either). I couldn't find the line for uncommenting the Default Methods region, do I need to make one for IS_BTN?

Thanks for reading

NCN.UCID should work, make sure you set the right flags on the button, with some flags the button is still invisible. Just play around a bit.

Example:
InSim.Send_BTN_CreateButton("blabla", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK | Flags.ButtonStyles.ISB_CLICK, 5, 40, 52, 31, 100, NCN.UCID, 40, false);

You don't need to uncomment anything to create a button. But if you want to receive button clicks you have to enable the BTC event and create the method required. If you want to receive text from textbox buttons you have to enable the BTT event.
Quote from T-RonX :NCN.UCID should work, make sure you set the right flags on the button, with some flags the button is still invisible. Just play around a bit.

Example:
InSim.Send_BTN_CreateButton("blabla", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK | Flags.ButtonStyles.ISB_CLICK, 5, 40, 52, 31, 100, NCN.UCID, 40, false);

You don't need to uncomment anything to create a button. But if you want to receive button clicks you have to enable the BTC event and create the method required. If you want to receive text from textbox buttons you have to enable the BTT event.

I presume that it needs to be sent from within void BTN(Packets.BTN BTN) ?
Quote from dougie-lampkin :I presume that it needs to be sent from within void BTN(Packets.BTN BTN) ?

No you can send it where ever you need to send it..like the MST
Quote from mcgas001 :No you can send it where ever you need to send it..like the MST

Well that explains why it probably didn't work...lol

So, am I correct in saying that you need to make a new method (IS_MCI, IS_MSO, etc.) for RECEIVING packets only?

EDIT: Works now! TY guys!
Quote from dougie-lampkin :Well that explains why it probably didn't work...lol

So, am I correct in saying that you need to make a new method (IS_MCI, IS_MSO, etc.) for RECEIVING packets only?

Yup
Ah, that explains! TY
where can we got a doccument for editing the form1.cs cause i try to set password for this and its keep saying "InSim : password does not match your multiplayer admin password"

thanks in advance.
Quote from Evilvan911 :where can we got a doccument for editing the form1.cs cause i try to set password for this and its keep saying "InSim : password does not match your multiplayer admin password"

thanks in advance.

You need to open the LFS_External_Client.sln with Microsoft Visual C# (Or maybe other C# environments work, IDK...), and then the form1.cs

The password option should be set to "password" by default, if you search the source in form1.cs you'll find it

Hope this helps...
Updated to version 1.04. Now includes MIT license, bug fixes and some minor changes.
#64 - vane
what is the difference between putting stuff in the form1.cs and program.cs? and also what does MIT license do? om guessing it checks for an lfs license
Quote from vane :what is the difference between putting stuff in the form1.cs and program.cs? and also what does MIT license do? om guessing it checks for an lfs license

Read the license.txt file included in the zip file for the license information.
#66 - vane
would you put something like "void spectate" in the form1.cs?
Form1.cs is where you should put ALL of your InSim program. At least, I do, and it works perfectly...
Quote from vane :what is the difference between putting stuff in the form1.cs and program.cs?

I would recommend that you spend some time learning about the C# programming language, specifically the part about classes and objects. You will find many introductory tutorials which answer your question by searching on Google.
#69 - vane
i have a text box on the form of my insim, how do i make it so what ever you type in that box is the admin password?
Take some C# lessons. Don't spam this thread with basic C# questions... Google is your friend!
Quote from T-RonX :Take some C# lessons. Don't spam this thread with basic C# questions... Google is your friend!

+ 1
i followed the development of this lib with one eye since starting it, but the question i asked myself: why having a second LFSLib-like library, especially LFSLib includes still all aspects ?
Quote from haelje :i followed the development of this lib with one eye since starting it, but the question i asked myself: why having a second LFSLib-like library, especially LFSLib includes still all aspects ?

As T-RonX said at the start
  1. it was a learning purpose of his!
  2. its easier to use for a beginner
LFSLib is also GPL'ed, which some people may not find suitable.
Quote from mcgas001 :its easier to use for a beginner

is it ? what is the "hard to use"-aspect of LFSLib ? i found it very easy to understand, very clear class structure and clear concepts (but only my 2 cents)

mhh, that a GPL licenced lib for a community scares some people to use it, is also not understandable for me, but this is more a philosophy thing i don't wanna do money with insim-progs or something similar so i dont care to give away my codes, but it's defenitely better for the community if there are more sources of all aspects of lfs coding, so all can take a look and find a lot nice solutions.

.NET - LFS External (InSim/OutSim/OutGauge SDK Library)
(538 posts, started )
FGED GREDG RDFGDR GSFDG