Check out the first post in this thread, there is an example how to use OutGauge in LFS_External. The code I posted is sort of a pseudocode, so you'll need to modify it to your needs.
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
public string Plate;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public char[] Plate;
1) get you mindeffed and
2) annoy you, which will
3) probably make you post "angry" help threads in which
4) you will get a lot of members annoyed too which can
4.1) make you post more "angry" posts that will get you banned or
4.2) get all your threads deleted, or nobody replying to them.
using System;
using LFS_External.InSim;
class Program
{
static void Main()
{
InSimInterface insim = new InSimInterface(new InSimSettings());
insim.VER_Received += new InSimInterface.VER_EventHandler(insim_VER_Received);
insim.Connect();
Console.ReadKey(true);
}
static void insim_VER_Received(LFS_External.Packets.IS_VER VER)
{
Console.WriteLine("InSim Version: {0}", VER.InSimVer);
}
}
<?php
public static byte[] ISP_BTN(string ButtonText, LFS_External.InSim.Flags.ButtonStyles Style, byte Height, byte Width, byte Top, byte Left, byte ClickID, byte UniqueID, byte RequestID, bool AlwaysVisible)
{
LFS_External.Packets.IS_BTN sourceStruct = new LFS_External.Packets.IS_BTN
{
Size = 0xfc,
ReqI = RequestID,
Type = 0x2d,
UCID = UniqueID,
BStyle = Style,
ClickID = ClickID,
Text = ButtonText,
TypeIn = 0
};
if (AlwaysVisible)
{
sourceStruct.Inst = 0x80;
}
sourceStruct.H = Height;
sourceStruct.W = Width;
sourceStruct.T = Top;
sourceStruct.L = Left;
return Util.PacketToData(sourceStruct);
}
public static byte[] ISP_BTN(string ButtonText, string DialogCaption, LFS_External.InSim.Flags.ButtonStyles Style, byte Height, byte Width, byte Top, byte Left, byte TypeIn, byte ClickID, byte UniqueID, byte RequestID, bool AlwaysVisible)
{
LFS_External.Packets.IS_BTN sourceStruct = new LFS_External.Packets.IS_BTN();
char ch = '\0';
string str = string.Concat(new object[] { ch, DialogCaption, ch, ButtonText });
sourceStruct.Size = 0xfc;
sourceStruct.ReqI = RequestID;
sourceStruct.Type = 0x2d;
sourceStruct.UCID = UniqueID;
sourceStruct.BStyle = Style;
sourceStruct.ClickID = ClickID;
sourceStruct.Text = str;
sourceStruct.TypeIn = TypeIn;
if (AlwaysVisible)
{
sourceStruct.Inst = 0x80;
}
sourceStruct.H = Height;
sourceStruct.W = Width;
sourceStruct.T = Top;
sourceStruct.L = Left;
return Util.PacketToData(sourceStruct);
}
?>
' A collision happened.
Private Sub CON_CONTACT(ByVal CON As Packets.IS_CON)
If DoInvoke() Then
Dim p As Object = CON
Me.Invoke(New dlgCON(AddressOf CON_CONTACT), p)
Return
End If
'some test code to test it out
textBox1.Text += CON.A.PLID & Constants.vbCrLf
textBox1.Text += CON.B.PLID & Constants.vbCrLf
End Sub
Function getname(ByVal PLID As Integer) As String
Dim i As Integer = 0
Do
If Connections(i).UniqueID = GetUniqueID(PLID) Then
Return Connections(i).PlayerName
End If
i = i + 1
Loop Until i = Connections.Count
End Function
Public Function GetUniqueID(ByVal PLID As Integer) As Integer
For i As Integer = 0 To Players.Count - 1
If Players(i).PlayerID = PLID Then
Return Players(i).UniqueID
End If
Next i
Return 0
End Function