The online racing simulator
Searching in All forums
(94 results)
ADr3nAl1n
Demo licensed
And definitely a helicopter , I like helicopters
ADr3nAl1n
Demo licensed
I'm still having a problem ...
The insim keeps crashing after a while and I see in the host display

ISP_BFN -Invalid ClickID ,Every time someone clicks the X of a panel to close it .

It closes correctly the panel correctly but I don't understand why I get that invalid click id ...

May be that the cause of crashing?
ADr3nAl1n
Demo licensed
First make the buy id button work


InSim.Send_BTN_CreateButton("^1Buy", Flags.ButtonStyles.ISB_CLICK, 6, 6, 46, 111, 176, MSO.UCID, 1, false);

176 is the button id (mso.ucid is for chat command)

And add in button click the case 176

switch (BTC.ClickID)
{
#region " XFG "

[COLOR="Red"] case 176:[/COLOR]

if (Conn.Cash > 7999)
{
if (Conn.Cars.Contains("XFG") == false)
{
string Cars = Conn.Cars;
Cars = Cars + " " + "XFG";
Conn.Cars = Cars;
Conn.Cash -= Dealer.GetCarPrice("XFG");
MsgAll("^1)^7 " + Conn.PlayerName + " ^7bought a ^1XFG");
MsgPly("^1)^7 You have bought ^1(XFG) ^7in Garage", Conn.UniqueID, 1);
MsgPly("^1)^7 Price Tag: ^1€" + Dealer.GetCarPrice("XFG") + " ^7You have: ^2€" + Conn.Cash + " ^7left", Conn.UniqueID, 1);

}
}

break;
}
#endregion


ADr3nAl1n
Demo licensed
Quote from kappa007 :guys did you also told them you have cracked your LFS. and you drive online.
certainly that wouldnt happen if you use official master server

http://pereulok.net.ru/lfsp/#users/detail/jann3[fin] -Mater
http://pereulok.net.ru/lfsp/#users/detail/ADr3nAl1n -adrenalin

http://pereulok.net.ru/lfsp/#online
server is
[SCS]Cruise City S2

and add code

if(user_from_russia) //checks if user from russia
ban=999; //ban him for 999 days

RUSSIAN CRUISE hackers <3

You are playing there too .
And thank you for the code its very helpful ._.
ADr3nAl1n
Demo licensed
I'm not familiar with PRISM , I don't think my insim has anything to do with prism

struct IS_ACR // Admin Command Report - any user typed an admin command
{
byte Size; // 72
byte Type; // ISP_ACR
byte ReqI; // 0
byte Zero;

byte UCID; // connection's unique id (0 = host)
byte Admin; // set if user is an admin
byte Result; // 1 - processed / 2 - rejected / 3 - unknown command
byte Sp3;

char Text[64];
};

But I don't understand what to add in the IS_APR packet , and IS_APR is missing from lfs external packets
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
Very sure.

They also sent a link to a member on the cruise server that was supposed to be the hack, and then without even clicking the file they hacked his account ,

Next thing I know the guy was using the member's account banning everyone from the server

EDIT: Looks like nothing happens when i set /vote=yes

And I don't know how to make the insim detect commands that starts with /
Last edited by ADr3nAl1n, .
Insim detecting commands?
ADr3nAl1n
Demo licensed
So there is a new "ban hack" tool wondering around the internet for lfs that enables the vote kick/ban in any server , which is a bad for cruise servers

So i was wondering if its possible to make the insim detect when the /vote=yes and change the server to vote=no with

InSim.Send_MST_Message("/vote=no");


EDIT:
I was thinking like this
if (HOSTF_CAN_VOTE == 1)
{
InSim.Send_MST_Message ("/vote=no");
}

But I don't know in which packet to put it , Can someone help me ?
Last edited by ADr3nAl1n, .
help cmd
ADr3nAl1n
Demo licensed
Quote from sankkuq :!help command doesnt work.. How to fix it?

It doesn't work because its not added .
Go to chatcommands.cs and add this

[Command("help", "help")]
public void help(string Msg, string[] StrMsg, Packets.IS_MSO MSO)
{
if (StrMsg.Length > 0)
{
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);
InSim.Send_MTC_MessageToConnection("", MSO.UCID);

}
}

Add the commands you wish to be shown between " "
You can find them in chatcommands.cs
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
I would suggest you try [iC] inline
ADr3nAl1n
Demo licensed
Thank you very much ! you are right , it is in IS_BTT not in IS_BTC
Im gonna change it and see how it goes

EDIT: Yep it worked ...
Thank you ridiculously good at coding guy :P
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
Quote from cargame.nl :I think you need to post the definition of the function of InSim.Send_BTN_CreateButton too. Otherwise only people who have some experience with this particular code can say something about it.

I didn't understand what you tried to say :P
tip
ADr3nAl1n
Demo licensed
Just take an open source from the forum and experiment with it .
Since you don't know anything about coding you can't start coding a new insim from scratch .
Button Codes , Willing to help ?
ADr3nAl1n
Demo licensed
Its about the electronics & furniture , Just like in LTC
The problem is that you can buy more than 10 items , because when you click the "buy" button you have to enter the amount you want to buy , and if you have already , lets say 9 items you can type 10 and have 19 items.

What I want to do is to make the buy button to buy only 1 item per click .

InSim.Send_BTN_CreateButton("^2Buy", "Maximum Buy 10 and you have " + Conn.Electronics, Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 65, 100, 2, 118, Conn.UniqueID, 2, false);

I just remove the "maximum buy ... " and the number 2 from 4, 10, 65, 100, 2, 118
And change the case 118
case 118:
byte Electronics = byte.Parse(BTT.Text);
if (BTT.Text.Contains("-"))
{
MsgPly("^4)^7 Transaction Incorrect. Don't put minus on the values!", BTT.UCID);
}
else
{
if (Electronics > 10)
{
MsgPly("^4)^7 Cannot buy more than^2 10 Electronic Items!", BTT.UCID);
}
else
{
if (Conn.Electronics < 10)
{
if (Conn.Cash > 190 * Electronics)
{
Conn.Electronics += Electronics;
Conn.Cash -= 190 * Electronics;
Conn.TotalSale += Electronics;

MsgPly(Conn.PlayerName + "^7 bought some ^6Electronic^7 for ^2€" + Electronics * 190 + "^7!", BTT.UCID);
MsgPly("^1) Total Electronic: " + Conn.Electronics, BTT.UCID);

if (Conn.LastRaffle == 0)
{
MsgPly("^4)^7 Buy more items and more chances of winning in the ^1Raffle!", BTT.UCID);

if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^7Total Item bought: ^2(" + Conn.TotalSale + ")^7 Raffle for ^1€300", Flags.ButtonStyles.ISB_LEFT, 4, 100, 73, 54, 116, Conn.UniqueID, 2, false);
InSim.Send_BTN_CreateButton("^2Raffle!", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 73, 100, 120, Conn.UniqueID, 2, false);
}
}
if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^2Buy", "Maximum Buy 10 and you have " + Conn.Electronics, Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 65, 100, 2, 118, Conn.UniqueID, 2, false);
}
}
else
{
MsgPly("^4)^1 Not Enough Cash to complete the transaction.", BTT.UCID);
}
}
else
{
MsgPly("^4)^1 Cannot carry more than 10 items!", BTT.UCID);
}
}
}

to

#region ' Electronic '
case 118:

if (Conn.Electronics < 10)
{
if (Conn.Cash > 190)
{
Conn.Electronics += 1;
Conn.Cash -= 190;
Conn.TotalSale += 1;

MsgPly(Conn.PlayerName + "^7 bought some ^6Electronic^7!", BTT.UCID);
MsgPly("^1) Total Electronic: " + Conn.Electronics, BTT.UCID);

if (Conn.LastRaffle == 0)
{
MsgPly("^4)^7 Buy more items and more chances of winning in the ^1Raffle!", BTT.UCID);

if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^7Total Item bought: ^2(" + Conn.TotalSale + ")^7 Raffle for ^1€300", Flags.ButtonStyles.ISB_LEFT, 4, 100, 73, 54, 116, Conn.UniqueID, 2, false);
InSim.Send_BTN_CreateButton("^2Raffle!", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 73, 100, 120, Conn.UniqueID, 2, false);
}
}
if (Conn.DisplaysOpen == true && Conn.InStore == true && Conn.InGameIntrfc == 0)
{
InSim.Send_BTN_CreateButton("^2Buy", Flags.ButtonStyles.ISB_LIGHT | Flags.ButtonStyles.ISB_CLICK, 4, 10, 65, 100, 118, Conn.UniqueID, 2, false);
}
}
}
break;
#endregion

But when i click the buy button nothing seems to happen . Can someone tell me what I am doing wrong ?
I discovered that the number 2 in ButtonStyles.ISB_CLICK, 4, 10, 65, 100, 2, 118, Conn.UniqueID is the dialog that shows when i click buy but I didn't understand what exactly it represents , or if it leads to something else
ADr3nAl1n
Demo licensed
I won't start another topic , So ... I was wondering (again)

Is it possible to send a Msg when two cars hit each other ?

I saw that since 0.6b , car contact detection can be possible

something with setting ISF_ flag , But i wonder how it works , the insim.txt doesn't say that much
ADr3nAl1n
Demo licensed
Thanks for you quick reply , I figured it out by this

I added the button

<?php 
InSim
.Send_BTN_CreateButtonFlags.ButtonStyles.ISB_CLICK, , , , 200 MSO.UCID40false);

and 
in private void BTC_ButtonClicked(Packets.IS_BTC BTC)

 switch (
BTC.ClickID)
                {
                    
#region

                    
case 200:
                        
DeleteBTN(200BTC.UCID);
                        break;
                }
                        
#endregion
?>

But yours is better and easier , PoVo your the man !
Last edited by ADr3nAl1n, .
ADr3nAl1n
Demo licensed
One more question :P

How do I make a button close on click ?

InSim.Send_BTN_CreateButton("^1X", Flags.ButtonStyles.ISB_DARK | Flags.ButtonStyles.ISB_CLICK, 6, 6, 52, 90, 173, UniqueID, 2, false);

Maybe something like DeleteBTN(173, UniqueID); if its clicked?

I can't figure it out how , I saw something with ClickID, Do I have to set the button id first ?

And what does the "2" before false or true represents ?
ADr3nAl1n
Demo licensed
Seems like I can't do anything

Anyway thanks for your answer PoVo !


EDIT: Looks like a miracle , I double clicked by mistake while I was in that folder and it worked without giving the missing csproj error ,
I pressed F6 but it has some errors. At least I have something to kill time
Last edited by ADr3nAl1n, .
Coding help
ADr3nAl1n
Demo licensed
So I have this open source insim , And I'm trying to learn a little , experiment with the codes , but the thing is the project is missing the file .csproj
And no matter what I do the insim remains the same after opening and editing some of the source files , like "form1.cs" and so on .
I tried with vs 2008 and vs 2010 but the same thing.
Is it because that csproj file missing ? I would appreciate some tips from a more experienced guy.
Last edited by ADr3nAl1n, .
open source
ADr3nAl1n
Demo licensed
Its the best open source so far
Last edited by ADr3nAl1n, .
FGED GREDG RDFGDR GSFDG