The online racing simulator
#1 - vane
License check code example for LFS_External
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...
Quote from vane :I am attempting to do this in my insim app but i keep getting errors, i assume it is a basic syntax error

private void VER_InSimVersionInformation(Packets.IS_VER VER)
{
[B]if (VER.Product = "DEMO")[/B]
{
InSim.Close();
MessageBox.Show("This Program only works with S1 or S2");
}

}


That should be:

if (VER.Product [b]==[/b] "DEMO")
{
// Pass
}

Edit: OK - you cheated and edited your post.
#3 - vane
yep! originally i did it, then tested it and it didn't work so i quickly changed it!

FGED GREDG RDFGDR GSFDG