The online racing simulator
Searching in All forums
(407 results)
vane
S3 licensed
yep! originally i did it, then tested it and it didn't work so i quickly changed it!
License check code example for LFS_External
vane
S3 licensed
I have just written this code and just felt like releasing it!

private void VER_InSimVersionInformation(Packets.IS_VER VER)
{
if (VER.Product.Equals("DEMO"))
{
InSim.Close();
MessageBox.Show("This Program only works with S1 or S2");
///LFS_External License Check by Vane/Peter Savage
}

}

It will check what product the user has and if it is demo, it closes the insim connection, whereas if it is S1 or S2 it does nothing!

Use it how you please!

Vane

EDIT: this will only work with LFS_External, it would need to be greatly modified to be used anywhere else...
Last edited by vane, .
vane
S3 licensed
OK thats working now, although it still says that the admin password is wrong
vane
S3 licensed
ah thank you dark times, that is probably what i want, i will try it now

EDIT: ok i have tried:

InSim.Send_BTN_CreateButton("^7LFS SC ^3v1.0", "text", Flags.ButtonStyles.ISB_DARK|Flags.InSimFlags.ISF_LOCAL, 3, 10, 190, 160, 96, 1, BFN.UCID, 40, false);

it says i can't use insimflags in it :s

EDIT 2: ah i got you, need to enter it like this:

InSimSettings Settings = new InSimSettings("127.0.0.1", 29999, 0, Flags.InSimFlags.ISF_MSO_COLS | Flags.InSimFlags.ISF_MCI | Flags.InSimFlags.ISF_LOCAL, '!', 500, "4576537535", "^7LFS CS", 5);

Last edited by vane, .
vane
S3 licensed
when i tried to open my insim in a server that already had an insim, the buttons from my insim did not show up :s
vane
S3 licensed
Also, is there any way of viewing this insim on a server that has an insim?
vane
S3 licensed
I have tried changing the BTN.UCID to 255 but it still did not make the button appear when the form button was pressed.

I have succesfully coded the part that interfaces with the controller and all the ancillary systems such as saving the data into an xml file to be loaded next time the program is loaded
vane
S3 licensed
well basically i am trying to find out how to make the insim buttons from say a timer ticking or a form button press. I am attempting to make an interface which is controlled by the scroll wheel on the DFGT steering wheel, and the insim part is so you can control features while in game, so effectively the insim isn't doing much more than just displaying buttons
vane
S3 licensed
thank you for the large amounts of code, but this is only mean to be a client side insim, creating buttons only on the client's lfs, not meant to be run on a server or anything. I have tried setting the UCID to 0 and 1 but that didnt work, i will try 255.
vane
S3 licensed
AT LAST! SOMEONE ELSE WHO HAS A DFGT! they are so bloomin' rare! now that there has been at least one person interest, i will make a more advanced concept program, it probably won't be too interesting, it would only be showing that i have got the button assignment parts done, it doesn't properly integrate with LFS yet but once i have re aquainted myself with insim coding that bit should all fall into place

Please note that this will work on any controller that has atleast 4 free buttons because it basically just will scroll through buttons in lfs. Because of this i think i will call it LFS Controller Scroller
vane
S3 licensed
haha i could sell the xbox bits to an old school person (i won't call him a friend, he never really was ) he is absolutely obsessed with his xbox and re runs of top gear on dave but thats a whole different thread bring it on!

I can imagine it now, all pit for the 10 minute advert from the sponsors! no doing other things while this is going on! it doesn't just spam the screen with 'BUY OUR PRODUCTS, BUY OUR PRODUCTS, BUY OUR PRODUCTS' etc etc does it?
vane
S3 licensed
One thing i have found is never open a forum till what your presenting has grown to need a forum, otherwise it makes you look feeble and insignificant... most of the forums i opened when i was quite a bit less mature probably weren't used for more than a week


Looking at all these threads, it looks like the stig does more admin work than actually racing, redbull racing? more like redbull name changing! drinking red bull all night long so that he can finish thinking up weird and wacky new names...
Last edited by vane, .
vane
S3 licensed
is that what you mean?
private void button1_Click(object sender, EventArgs e)
{
static public InSim.Send_BTN_CreateButton("Button Text", "Title", Flags.ButtonStyles.ISB_DARK | Flags.ButtonStyles.ISB_CLICK, 5, 30, 100, 10, 96, 1, ???, 40, false);
}

Last edited by vane, .
vane
S3 licensed
Xbox prizes? i fear i see a problem in your logic, most of us don't have xboxes!!! lol
vane
S3 licensed
Can anyone answer my question?

I will repost it incase it got lost

Quote :Is there any way i can start a button underneath a 'private void button1_Click(object sender, EventArgs e)'?

I was thinking about the UCID problem, can anyone help me?

vane
S3 licensed
I can't quite do it with my eyes shut but...
vane
S3 licensed
Is there any way i can start a button underneath a 'private void button1_Click(object sender, EventArgs e)'?

I was thinking about the UCID problem, can anyone help me?
vane
S3 licensed
Right, now i have got it so it is reading the button presses of the wheel.
vane
S3 licensed
i don't mean actually compiling it, in the debug menu instead of debug, there is open without debugging, i opened that and after that it just started working miraculously!
'Packet for unknown connection, Avoiding buffer crash (OK), Lost connection to host'
vane
S3 licensed
I keep getting this on the [LTC] Live To Cruise server, it may have something to do with krammeh's insim but i thought i would post it here first, screenshot attached
vane
S3 licensed
Normally if you wait anything up to a minute then try it should have caught up, i think what happens is th master server lags because you were cut off quickly, happens to me sometimes
vane
S3 licensed
OK, thought i would update the thread, i have partly sorted out the function for selecting which button does which and i have sorted it so it saves the button assignments to a .xml file.

I am working on getting the buttons assigned to do simple operations as of yet and i am still reacquainting myself with the insim code of LFS_External as i haven't used it for quite a while

WATCH THIS SPACE!!!
vane
S3 licensed
Ok this is weird, i tried using the 'open without debugging' option and now it works :s very strange! now the debugging menu is working as well
vane
S3 licensed
well it does have ' byte[] joystickbtn = state.GetButtons();' right above it :s
vane
S3 licensed
I tried copying and pasting that bit of code to be put underneath another 'private void' thing, activated by a different timer and button but when i try and debug it comes up with an error saying 'Object reference not set to an instance of an object.' under the 'buttons = new bool[joystickbtn.Length]; line
FGED GREDG RDFGDR GSFDG