The online racing simulator
Searching in All forums
(62 results)
yoran765
S2 licensed
What we know so far;

Absolutely nothing.

Not trying to be rude or anything, but seriously - PLEASE make sure your thread contains useful information instead of one sentence containing **** all asking for help.
Last edited by yoran765, .
yoran765
S2 licensed
You've probably cracked the game, just noticed.

Just to push you into the right direction, no; that is not how you do it.

¯\_(ツ)_/¯
yoran765
S2 licensed
What I basically do is grab a round number, 100 for example and start indenting w/ Unique IDs.

Example;

Player 1 (Unique ID, 1) = Click ID, 101.
Player 2 (Unique ID, 2) = Click ID, 102.
Player 3 (Unique ID, 3) = Click ID, 103.

100 is probably way to high, but it all depends on how many buttons you use for your application.
yoran765
S2 licensed
Well i do know how it works with connection adding tables ect...
InSim.NET - MySql
yoran765
S2 licensed
Hi again!

My question is... Is there a tutorial on how to create a MySQL Database on InSim.NET?

Thanks!

Yoran
InSim.NET - BFN.DELETE
yoran765
S2 licensed
Hi again...

Tried what i could but can't seem to delete a button just learned how to set up a clickable button that actually sends a message but dident figure out how to delete a button any ideas?

Thanks!

Yoran
yoran765
S2 licensed
My question is why do you actually need other lfs racer's IP's?
yoran765
S2 licensed
Forgot to bind it :P Nooby mistakes

Thanks!
Yoran
InSim.NET - ClickID's
yoran765
S2 licensed
Hi again,

I'm trying to make it so that if i click a button a text will be displayed. I know it sounds nooby but I don't get anything that insim.net has :P Read the insim file already cant find anything :P I thougth like private void ButtonClick or something then tried it out and found out it dident work

Any help? Thanks!

Yoran
yoran765
S2 licensed
Thanks!

Works pefectlly fine now

Yoran
String Message Length?
yoran765
S2 licensed
Hi,

Sorry for making these threads but im just trying to learn more and more each day :P So let me get started :P

Basiclly i've made a OnCarContact code witch works perfectly fine untill a PlayerName gets to long or the message itself gets to long a example :


<?php 
MessageToAll
("^1** ^2Collision : " _players[CON.A.PLID].PName " ^1(^2" _players[CON.A.PLID].CName "^1)" "^2 hit " _players[CON.B.PLID].PName);
?>

This does not show the whole message when a player is hit. I've tried to but it in a Var but still diden't work any ideas?

Thanks! Yoran
yoran765
S2 licensed
Just found out myself It was _players not _connections

Thanks too you two for all the help and support!

Thanks!

Yoran
yoran765
S2 licensed
Just noticed what i did wrong the _connections[CON.A.PLID].PName gives me the error pretty wierd :s Anyway i can still get Player Names through Contact?

Thanks!

Yoran
yoran765
S2 licensed
Not sure what you just said there could you maybe explain abit better? :P Thanks
yoran765
S2 licensed
Decided to use your example DK I hope i can actually use it :P But will put your name on the Rights

Alright so basiclly i've added the Packet IS_CON no errors. Then i've added the flag ISF_CON still no errors. When i actually crash someone it says : There was a packet-error : The given key was not present in the dictionary. Not sure what this means but its not working out.

Any help?

Thanks!
Yoran
yoran765
S2 licensed
Thanks mate!

Just what i needed!

Thanks for all the support and help!

Yoran
yoran765
S2 licensed
EDIT :

Got it to work but when i hit someone it shows 1 hit 3...
Not sure how but it is since i cant get PlayerName out of con.A/B
Last edited by yoran765, .
yoran765
S2 licensed
Basiclly what i have now is this :

static void CarContact(InSim insim, IS_CON con)
{

insim.Send("/msg ^2Contact Detected!");
double speed = MathHelper.MpsToKph((con.SpClose & 0x00ff) * 0.1);

if (con.A.Speed > con.B.Speed)
{
insim.Send("/msg " + con.A.PLID + " ^2hit " + con.B.PLID);
}

}

But its still not sending "Contact Detected!"

Not sure if i've done something wrong...

Thanks,
Yoran
IS_CON - InSim.NET
yoran765
S2 licensed
Hello!,

Kay decided to switch from Lfs_External to InSim.NET. Best choice i've ever made Alright let me get to my point :P

Inserted the Contact packet and started to code some shitznee :

static void CarContact(InSim insim, IS_CON con)
{
//Conn1 = con.A.PLID;
//Conn2 = con.B.PLID;
double speed = MathHelper.MpsToKph((con.SpClose & 0x00ff) * 0.1);

if (con.A.Speed > con.B.Speed)
{
insim.Send("/msg " + con.A.PLID + " ^2hit " + con.B.PLID);
}

insim.Send("/msg ^2Contact detected!");
}

Problem is if i hit someone it doesn't actually well work...

Any ideas?

PS : New to InSim.NET don't get shit read the document already over and over again nothing that can actually help me :P Im suprised i can actually get the insim connected :P

Thanks alot!

Yoran
yoran765
S2 licensed
What he posted :

Quote from skywatcher122 :I tried to fix the Create_BTN bug which limits characters (which extracted from LFS_External 1.1.0.0 DLL from dissembler) and it seems to be working on DarkTimes 1.1.1.6

open "MakePacket.cs" and replace the code below

<?php 
        
public static byte[] ISP_BTN(string ButtonTextLFS_External.InSim.Flags.ButtonStyles Stylebyte Heightbyte Widthbyte Topbyte Leftbyte ClickIDbyte UniqueIDbyte RequestIDbool 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.Height;
            
sourceStruct.Width;
            
sourceStruct.Top;
            
sourceStruct.Left;
            return 
Util.PacketToData(sourceStruct);
        }

        public static 
byte[] ISP_BTN(string ButtonTextstring DialogCaptionLFS_External.InSim.Flags.ButtonStyles Stylebyte Heightbyte Widthbyte Topbyte Leftbyte TypeInbyte ClickIDbyte UniqueIDbyte RequestIDbool AlwaysVisible)
        {
            
LFS_External.Packets.IS_BTN sourceStruct = new LFS_External.Packets.IS_BTN();
            
char ch '\0';
            
string str string.Concat(new object[] { chDialogCaptionchButtonText });
            
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.Height;
            
sourceStruct.Width;
            
sourceStruct.Top;
            
sourceStruct.Left;
            return 
Util.PacketToData(sourceStruct);
        }
?>


yoran765
S2 licensed
Fixed the problem by a code that Skywatcher posted : ) Thanks for all the help
yoran765
S2 licensed
Tried it out done this so far :

var uf1 = "^1* ^2Vehicle: ^7UF1 ^2Buy Price: ^74000$ ^2Sell Price: ^74000$ ^1- ^2Purchased ^1- ^2Sell";
InSim.Send_BTN_CreateButton(uf1, Flags.ButtonStyles.ISB_C1, 5, 50, 50, 50, 190, NCN.UCID, 2, false);

The same problem is accuring : (
yoran765
S2 licensed
Never thought of that Thanks! Ill Definitely try this method
LFS-External - String Msg Length
yoran765
S2 licensed
Hi,

Been looking around for solutions to solve this but came upon a problem. Been using LSGO For a base and updated everything to LFS_External 1.1.1.7.
Been working great but noticed that if you make the text in a button or a message that it wont show. Is there anyway to actually fix this? Heard people saying that you can fix this with String.Length not sure at all

Thanks!

Yoran
FGED GREDG RDFGDR GSFDG