Hi, Anyone have an InsimDotNet Insim that works I can use as a template for my insim? New to insim.net, I know shit all about it and I only know how to code LFS_External. All help would be appreciated
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using InSimDotNet;
using InSimDotNet.Packets;
class Program
{
using (InSim insim = new InSim())
{
//here you register packets do you want to use, like ISM
insim.Bind<IS_ISM>(InSimMulti);
// Initialize InSim.
insim.Initialize(new InSimSettings
{
Host = //host ip here,
Port = //port insim here,
Admin = //admin password here,
//UdpPort = 30000, // Specify UDP port
Interval = 750, // Update interval (milliseconds)
Flags = InSimFlags.ISF_MCI | InSimFlags.ISF_CON, // Enable MCI updates
Prefix = '!',
IName = //some insim name here
});
do
{
if (opt != "")
Console.Write(opt);
opt = Console.ReadLine();
} while (opt != "x");
}
//ISM function handler..
static void InSimMulti(InSim insim, IS_ISM ism)
{
try
{
Console.WriteLine("Server:" + InSimDotNet.Helpers.StringHelper.StripColors(ism.HName));
// Whenever we connect to a host request the player and connection lists.
insim.Send(new IS_TINY { ReqI = 1, SubT = TinyType.TINY_NCN });
insim.Send(new IS_TINY { ReqI = 1, SubT = TinyType.TINY_NCI });
insim.Send(new IS_TINY { ReqI = 1, SubT = TinyType.TINY_NPL });
// Request for STA info packet to be sent.
insim.Send(new IS_TINY { SubT = TinyType.TINY_SST, ReqI = 1 });
insim.Send(new IS_TINY { SubT = TinyType.TINY_AXI, ReqI = 1 });
}
catch (Exception e)
{
_log.Error("Exception: In InSimMulti: ", e);
}
}