The online racing simulator
Searching in All forums
(921 results)
broken
S3 licensed
You can just see if the car has caused a yellow flag and if the speed of it is 0kph. And then spectate it. I've had this exact idea for my insim app too.
broken
S3 licensed
Quote from ColeusRattus :That would be only true if the cars have power steering. Which they don't have, by the feel of the force-feedback.
Concerning the braking: if your braking assistant is off, it doesn't mean you're braking slower, it just means you need to apply more pressure to achieve the same stopping distance.
Actually, that would also be true for the steering, as the car would just steer as fast (as in how much the wheels rotate per how much you turn the wheel), you just need more force.



This is an incredibly stupid thing to do. Thak god you didn't pull the key, or else the steering lock would've caused you a lot of trouble.

I know that you need more force.... But how would you put this force in LFS? That's why I said imitation and not simulation...
---
And even if I did pull the key(even tho I believe that I'm not that stupid), as soon as I felt the wheel lock I'd hit the brakes, don't you think? But let me give you some more information: I know I said 5 meters, but if I have to be exact it was like 1 or 2 meters, it was around 06:30am, the street I was going to enter was one way and I had stopped, so a friend could get off the car and go call 1 other guy, where I actually stopped the engine... The wheel was already turned and the car was leaned forward, so all I had to do is release the brakes, let the wheel straighten on it's own while the car is going forward, and then slightly change the direction so I could park.
Now..... I think judging so fast, without really knowing all the facts is not the smartest thing to do too. I just didn't feel like I had to explain the whole situation in a thread about a suggestion, but after you seemed to care...
And just one more thing: Maybe you would say it's stupid to drive at 06:30am... Well I will just say that I still had my reasons.
broken
S3 licensed
Quote from J@tko :The grip bit would probably be easy - but then there's these factors to factor in:
  • Amount of grip changing due to rain falling/drying up
  • Aquaplaning [does any sim actually have this yet?]
  • Spray
  • Windscreen Wipers
I'd say the actually physics is ok so far [with regards to 'adding in' rain] but some other things will need to be added too

I just gave up on making a post... But you said everything I wrote and just disregarded right afterwards.
broken
S3 licensed
Hehe, had no idea.
Hydraulics imitation and something more :D
broken
S3 licensed
What about if the engine of the car is off - (if possible) make wheels harder to spin... Make mouse a lot slower... And on keyboard - make it turn slower also. Would be kinda funny imo...
Oh and.... for wheels I guess it won't be possible(would've been really cool if it was.. or if it is ) but for mouse and keyboard - Make it so when u press brake button it brakes slower?

I actually got this idea from today... Turned my engine off... And I still had some distance to pass down the street to park the car(was trying to save fuel from 5 meters distance I guess ).... I actually forgot this turns off the hydraulics too... All of a sudden it became so hard to steer and brake...

2nd suggestion: When you press the clutch and release the gas.. Or turn to neutral - The revs go down too slow atm... Maybe make it go faster?

And 3rd(more like a reminder of a suggestion): When the car is left there with engine on - Don't turn it off after X seconds... Let people waste their fuel if they want to.

I'll add a poll for the lazy ones too.
broken
S3 licensed
Quote from fwj515 :Stig wat happend to ur F&F team you joined and SC oh or are you backstabing them all

What about you.... Every team you join - you claim that you will host them a server, and make them give you their "insim"... After which it's most likely seen in a "new" cruise server.... After that the "insim" creator/modifier gets to see his "insim" on 5 more "new" servers after a few days(and if this isn't backstabbing i don't know). Then you whine like hell when you get kicked out..

If I ever had to choose whether to be with you or with stig in the same team... I'd definetly choose stig.. Note: This is not a compliment.
broken
S3 licensed
Quote from master_lfs.5101 :DNS - Domain Name System(or server)

IP - Internet Protocol

Im pretty sure you don't use a domain to connect to a server through LFS. Otherwise LFS would have you specify a domain, not a ip?

A domain name can be set to point at an IP..... In case that you are hosting a server and have a dynamic IP(well, for LFS this isn't quite needed), you can set a domain name from which people will be able to connect to your server. There are even free dns providers... There is an example of a free one: http://www.dyndns.com/

In most games you have to specify the IP of the server to join. But in the field for the IP (logically) you have to be able to type in a domain name too.

But, then again, in LFS this would (in most of the cases) be needed if it has something do with cracked servers, imo...

But still... Problems with the DNS server? How would that matter in LFS, as long as your IP is real(or more like: the needed ports are opened). If your IP isn't accessible it's not the DNS' fault - it's more like your router or it's firewall or your own PC firewall.

Or was all I said just bs?
broken
S3 licensed
@DarkTimes: You really amazed me... The code you provided seems a lot smarter and in the same time shorter, even tho I haven't tested it yet, but I will definetly steal some of it.

[ Edit: ]
Ok, after my application was pissing me off from quite a while, because it was almost always staying in processes after I had closed it, I decided to do a little search on google. And so I did. I just wrote "C# process kill" and the first article I found was just what I needed. So... If you have any similar problem(this is mainly a problem in LFS_External), there is a source that could help you:

IMPORTANT -> NAMESPACE NEEDED : using System.Diagnostics;




static public bool proccessFindAndKill(string name)
{
//here we're going to get a list of all running processes on
//the computer
foreach (Process clsProcess in Process.GetProcesses())
{
//now we're going to see if any of the running processes
//match the currently running processes by using the StartsWith Method,
//this prevents us from incluing the .EXE for the process we're looking for.
//. Be sure to not
//add the .exe to the name you provide, i.e: NOTEPAD,
//not NOTEPAD.EXE or false is always returned even if
//notepad is running
if (clsProcess.ProcessName.StartsWith(name))
{
//since we found the proccess we now need to use the
//Kill Method to kill the process. Remember, if you have
//the process running more than once, say IE open 4
//times the loop thr way it is now will close all 4,
//if you want it to just close the first one it finds
//then add a return; after the Kill
try
{
clsProcess.Kill();
}
catch { }
//process killed, return true
return true;
}
}
//process not found, return false
return false;
}

I don't find any sense in explaining how to use it, because everyone with less than basic knowledge in C# can figure it out. On top of that there are already provided detailed enough explanations on how to use it.

Source: http://www.dreamincode.net/code/snippet1543.htm
Last edited by broken, .
broken
S3 licensed
Quote from Krammeh :I know where you are coming from, and I believe i've requested it somewhere.
But that isn't what the OP is asking for, he clearly stated he wanted it to store the accounts via the IP address.

Oh, re-reading his post.... It does really make sense.. Well the Bulgarian flag always affects my judgment so I will just now.
broken
S3 licensed
Quote from Krammeh :I am completely confused as to why you would want the cruise mod to work using IP addresses (unless you're wanting to code one for a LAN server?)

Most people(including me) want it for demo servers, so they can ban people with many accounts. Or at least slow them down, if they are with dynamic IPs.
broken
S3 licensed
Quote from dougie-lampkin :Glad someone understands it, it makes 0 sense to me now

From the 1st explanation I got an overall idea of what it does. Which after a little thinking I was probably going to understand.
But the 2nd explanation just saved this hard part - thinking.

Quote from dougie-lampkin :Just use "DateTime.Now.Year()" as the year part of it, it has it's own special algorithm to work out if it was a leap year If you're interested, this is exactly what it does:

public static int DaysInMonth(int year, int month)
{
if ((month < 1) || (month > 12))
{
throw new ArgumentOutOfRangeException("month", Environment.GetResourceString("ArgumentOutOfRange_Month"));
}
int[] numArray = IsLeapYear(year) ? DaysToMonth366 : DaysToMonth365;
return (numArray[month] - numArray[month - 1]);
}


I didn't really get it but as long as it works, I wouldn't care about the code. That's how I do.

Quote from dougie-lampkin :Heh, I know exactly what you mean. Just look at my spaghetti code in the open source cruise app :rolleyes:

I actually learned how to code on that application. Believe me it can be more stuffed up than you can imagine, so it's just perfect the way it is now.... If you could just see it when I started modifying it... It was suuuch a big mess. Right now I'm recoding almost everything. The damage was baad.

And you said it yourself: If people don't have knowledge in coding they shall not try it out. Actually I take that more like "If you don't have any basic knowledge in C#, then don't whine if you stuff it up.", cause imo that's what they should do(or in this case - what they don't have to do).

Oh and on topic: I remember reading somewhere: (about C#) Have only one try and catch code in a single thread. I really find sense in this, as the more try and catch codes you do when they are "in each other"(if you know what I mean) the less information you'll get, I think.. This will be because when you do try {} you actually prevent the previous try {} code from detecting this error. Now wasn't that confusing or what?
Last edited by broken, .
broken
S3 licensed
Quote from dougie-lampkin :This is built into .NET already, part of DateTime

[COLOR=blue]public[/COLOR] [COLOR=blue]static[/COLOR] [COLOR=blue]int[/COLOR] DaysInMonth(
[COLOR=blue]int[/COLOR] year,
[COLOR=blue]int[/COLOR] month
)


int DaysInFeb2009 = DateTime.DaysInMonth(2009, 2); // Returns 28, as 2009 is not a leap year
int DaysInFeb2009 = DateTime.DaysInMonth(2008, 2); // Returns 29, as 2008 was a leap year

RequestID is sent in IS_BTC. It's usually used if you have two buttons with the same ClickID that are sent in different "areas" (so they don't show at the same time, because they can't), so that when the BTC is sent, you can see which "area" it was sent from. That's a terrible explaination I know, but I'm terrible at explaining things in general

For example, if you have a menu system, with different tabs. Each tab has 5 buttons, each with the same ClickID. But they all have different RequestIDs. So when one button is clicked, you can look at the RequestID in IS_BTC and see which tab is was sent from, to decide what to do with it. Any better?

Nice post though, a lot of useful information Might be worth adding it to the wiki, in a tutorial section, with a bit of code cleanup (no offence intended, but some areas are a bit messy to understand)?

The RequestID explanation was just perfect. Thanks!
-About february... I don't want to specify each year separately, but to make it work smart. :P
-EDIT: Yeah, see, I'm stupid.... I understood what you mean now tho.
And as for the messy code and explanations: I know. I didn't do much cleanup myself. Lazy a** I am. Wrote so much stuff and didn't spend a little time on cleaning it up.
Last edited by broken, .
broken
S3 licensed
Quote from Mike141292 :[...]
From what i've heared, he's already got 1 sale for a Bronze server; so lets wish him good luck!

OMG, poor people.. I feel sorry for them already.
Helpful functions/tips
broken
S3 licensed
I just thought... Such thread might help a lot of people, and all the people might show their way of coding, which will improve the imagination of others, and show them that a lot more stuff than they thought can be done.
ps: I consider myself one of the "others".

Tips:
1: To be better for everyone, if you have downloaded a free source project from somewhere - include it in here, and say if the code either matters for it or not.
2: Include the language it is coded on (C#, php, C++, VB, etc...).
3: Give some more information on what you are using it for and whatever more you want to include about the specific tip/function.
4: Say if it is either tested or not yet.
5: If you just want to make post with improvement of someone's code, why not post it? If they like it, you might have just helped them.
6: If it has been tested, say if it is finished, or you are still not very happy of the result, after all someone might help you.

Sooo... I will start with a few helpful functions:

Language: C#
Works with: LFS_External from the forums.
Result: Replaces clsConnection to clsPlayer and oposite
Level: Very easy.
Number functions in the code strip: 2
State: Tested and working like a charm. :P

static public clsPlayer convertToPlayer(clsConnection C)
{
foreach (clsPlayer P in Form1.Players)
{
if (P.PlayerID == C.PLID)
{
return P;
}
}
return null;
}

static public clsConnection convertToConnection(clsPlayer P)
{
foreach (clsConnection C in Form1.Connections)
{
if (C.PLID == P.PlayerID)
{
return C;
}
}
return null;
}

----------------------------------

Language: C#
Works with: Will work with every program.
Source used: LFS_External from the forums.
Result: Removes all lfs color codes in a string.
Level: TOO easy.
Number functions in the code strip: 1
State: Tested and works perfectly.

static public string removeColorCodes(string coloredText)
{
coloredText = coloredText.Replace("^1", "").Replace("^2", "").Replace("^3", "").Replace("^4", "").Replace("^5", "").Replace("^6", "").Replace("^7", "").Replace("^8", "").Replace("^9", "");
return coloredText;
}

----------------------------------

Language: C#
Works with: Will work with every program.
Source used: LFS_External from the forums.
Result: Reports errors to external text file.
Level: Not too easy.
Number functions in the code strip: 1
State: Tested and works perfectly.
Requirements: needs file "errorFile.txt" in folder "\errors\" which has to be located on the same location as your project. Also needs a string[] with additional information, which, of course can be null.
Request: It has a disabled code, which I couldn't get to work good, so if you have any solutions for it, you can tell me.

static public void buildErrorReportOnCrash(Exception E, string reportSituation, string errorDescr, string[] additionalInfo, string Username)
{
string errorInfo = @"errors";
string userInfo = @"users";
bool MEFCF = false;
bool SEFCF = false;
bool MEFWF = false;
bool SEFWF = false;
try
{
if (File.Exists(userInfo + "\\" + Username + ".txt") == true)
{
File.Copy(Application.ExecutablePath.Remove(Application.ExecutablePath.LastIndexOf('\\')) + "\\users\\" + Username + ".txt", Application.ExecutablePath.Remove(Application.ExecutablePath.LastIndexOf('\\')) + "\\users\\" + "BACKUP (" + Username + ")" + Convert.ToString(System.DateTime.Now.Hour) + ":" + Convert.ToString(System.DateTime.Now.Minute) + ":" + Convert.ToString(System.DateTime.Now.Second) + " " + Convert.ToString(System.DateTime.Now.Day) + "." + Convert.ToString(System.DateTime.Now.Month) + "." + Convert.ToString(System.DateTime.Now.Year));
}
}
catch
{
reportSituation += "-UBF";
}
string errorCode = Convert.ToString(System.DateTime.Now.Hour).PadLeft(2, '0');
errorCode += Convert.ToString(System.DateTime.Now.Minute).PadLeft(2, '0');
errorCode += Convert.ToString(System.DateTime.Now.Second).PadLeft(2, '0');
errorCode += Convert.ToString(System.DateTime.Now.Day).PadLeft(2, '0');
errorCode += Convert.ToString(System.DateTime.Now.Month).PadLeft(2, '0');
errorCode += Convert.ToString(System.DateTime.Now.Year) + "-" + errorDescr;

try
{
if (File.Exists(errorInfo + "\\errorFile.txt") == false)
{
File.Create(errorInfo + "\\errorFile.txt");
StreamWriter NewFile = new StreamWriter(errorInfo + "\\errorFile.txt");
NewFile.WriteLine("File created on: " + System.DateTime.Now.ToString());
NewFile.WriteLine("");
NewFile.Flush();
NewFile.Close();
}
}
catch
{
MEFCF = true;
}
try
{
/*if (File.Exists(errorInfo + "\\" + errorCode + ".txt") == false)
{
File.Create(errorInfo + "\\" + errorCode + ".txt");
StreamWriter NewFile = new StreamWriter(errorInfo + "\\" + errorCode + ".txt");
NewFile.WriteLine("File created on: " + System.DateTime.Now.ToString());
NewFile.WriteLine("");
NewFile.Flush();
NewFile.Close();
}*/
}
catch
{
SEFCF = true;
}

try
{
string mainErrorFile = "Failed to read file!";
try
{
StreamReader ErRe1 = new StreamReader(errorInfo + "\\errorFile.txt");
mainErrorFile = ErRe1.ReadToEnd();
ErRe1.Dispose();
ErRe1.Close();
}
catch { }

//Thread.Sleep(250);
StreamWriter ErWr1 = new StreamWriter(errorInfo + "\\errorFile.txt");
try
{
ErWr1.WriteLine(mainErrorFile);
}
catch { }
ErWr1.WriteLine("------------------------------------------------------------" + errorCode + "------------------------------------------------------------");
ErWr1.WriteLine("Exception: " + E.ToString());
ErWr1.WriteLine("------------------------------------------------------------");
try
{
ErWr1.WriteLine("Inner: " + E.InnerException.ToString());
}
catch
{
ErWr1.WriteLine("Inner: Inner exception not available");
}
try
{
ErWr1.WriteLine("Inner: " + E.InnerException.InnerException.ToString());
}
catch
{
ErWr1.WriteLine("Inner: Inner exception(x2) not available");
}
try
{
ErWr1.WriteLine("Inner: " + E.InnerException.InnerException.InnerException.ToString());
}
catch
{
ErWr1.WriteLine("Inner: Inner exception(x3) not available");
}
ErWr1.WriteLine("------------------------------------------------------------");
ErWr1.WriteLine("");
ErWr1.WriteLine("Report: " + reportSituation);
ErWr1.WriteLine("");
ErWr1.WriteLine("------------------------------------------------------------");
for (int tempint1 = 0; tempint1 < 15; tempint1++)
{
try
{
ErWr1.WriteLine("Add. Info(" + tempint1 + "): " + additionalInfo[tempint1]);
}
catch
{
ErWr1.WriteLine("Add. Info(" + tempint1 + "): Additional info n." + tempint1 + " does not contain any information.");
}
}
ErWr1.WriteLine("------------------------------------------------------------");
ErWr1.WriteLine("");
ErWr1.WriteLine("User: " + Username);
ErWr1.WriteLine("");
ErWr1.WriteLine("------------------------------------------------------------");
ErWr1.WriteLine("");
ErWr1.WriteLine("");
ErWr1.Flush();
ErWr1.Close();
}
catch
{
MEFWF = true;
}

try
{
/*string subErrorFile = "Failed to read file!";
try
{
StreamReader ErRe2 = new StreamReader(errorInfo + "\\" + errorCode + ".txt");
subErrorFile = ErRe2.ReadToEnd();
ErRe2.Dispose();
ErRe2.Close();
}
catch { }

///Thread.Sleep(250);
StreamWriter ErWr2 = new StreamWriter(errorInfo + "\\" + errorCode + ".txt");
try
{
ErWr2.WriteLine(subErrorFile);
}
catch { }
ErWr2.WriteLine("------------------------------------------------------------" + errorCode + "------------------------------------------------------------");
ErWr2.WriteLine("Exception: " + E.ToString());
ErWr2.WriteLine("------------------------------------------------------------");
try
{
ErWr2.WriteLine("Inner: " + E.InnerException.ToString());
}
catch
{
ErWr2.WriteLine("Inner: Inner exception not available");
}
try
{
ErWr2.WriteLine("Inner: " + E.InnerException.InnerException.ToString());
}
catch
{
ErWr2.WriteLine("Inner: Inner exception(x2) not available");
}
try
{
ErWr2.WriteLine("Inner: " + E.InnerException.InnerException.InnerException.ToString());
}
catch
{
ErWr2.WriteLine("Inner: Inner exception(x3) not available");
}
ErWr2.WriteLine("");
ErWr2.WriteLine("------------------------------------------------------------");
ErWr2.WriteLine("");
ErWr2.WriteLine("Report: " + reportSituation);
ErWr2.WriteLine("");
ErWr2.WriteLine("------------------------------------------------------------");
ErWr2.WriteLine("");
ErWr2.WriteLine("User: " + Username);
ErWr2.WriteLine("");
ErWr2.WriteLine("------------------------------------------------------------");
ErWr2.WriteLine("");
ErWr2.WriteLine("");
//ErWr.Flush();
ErWr2.Close();*/
}
catch
{
SEFWF = true;
}

if (MEFCF == true && SEFCF == true)
{
reportSituation += "-EFCF";
}
else if (MEFCF == true && SEFCF == false)
{
reportSituation += "-MEFCF";
}
else if (MEFCF == false && SEFCF == true)
{
reportSituation += "-SEFCF";
}

if (MEFWF == true && SEFWF == true)
{
reportSituation += "-EFWF";
}
else if (MEFWF == true && SEFWF == false)
{
reportSituation += "-MEFWF";
}
else if (MEFWF == false && SEFWF == true)
{
reportSituation += "-SEFWF";
}

Form1.InSim.Send_MST_Message("/msg ^3» ^1An error has occured. Please report to forums.");
Form1.InSim.Send_MST_Message("/msg ^3» ^1Report: ^8" + reportSituation);
Form1.InSim.Send_MST_Message("/msg ^3» ^1E. code: ^8" + errorCode);
Form1.InSim.Send_MST_Message("/msg ^3» ^1Occured with user: ^3" + Username);
}

Example of how to call this function:
Note: This is code from my insim, catching errors in the MSO thread.
try {}
catch (Exception EX)
{
string[] addInf = ("MSO.Msg: " + MSO.Msg + "|" + "MSO.UserType: " + MSO.UserType).Split('|');
additionalFunction.buildErrorReportOnCrash(EX, "MSO-TWR-UNN", "MSO(UNN)", addInf, Connections[GetConnIdx(MSO.UCID)].Username);
}

Tip: Use shortened codes which you have written somewhere to be recognised.
In this case the error code says:
MSO - MSO thread
TWR - Too Wide Range (of the exception)
UNN - Unknown (can't guess what exactly went wrong since the whole MSO thread is "surrounded" with try {}
MSO(UNN) will be added after the error code, so there is bigger chance if 2 errors occur in 1 second, to be recognised.
----------------------------------

Language: C#
Works with: Will work with every program.
Source used: LFS_External from the forums.
Result: Gets absolute(or more like - lowest) distance between 2 points in given _closed_ figure.
Level: Probably easy..
Number functions in the code strip: 1
State: Tested and works perfectly.
Requirements: No requirements
What I use this for mainly: To detect the distance between 2 players in nodes.
I call it like: the_class_its_located_in.absDifference(node of player1, node of player2, total count of nodes on track)

static public float absDifference(int numb1, int numb2, int bound)
{
int numH = numb1;
int numL = numb2;
if (numb1 > numb2)
{
numH = numb1;
numL = numb2;
}
else if (numb1 < numb2)
{
numH = numb2;
numL = numb1;
}
else if (numb1 == numb2)
{
return 0;
}

if (numL < bound && numH < bound)
{
return ((bound - numH) + numL);
}
else
{
return 3333333333;
//Returns error if something is messed up.
}
}

----------------------------------

Language: C#
Works with: Will work with every program.
Source used: LFS_External from the forums.
Result: Gets the time between the date you specify and today. Can be made to work with 2 different dates pretty easy too.
Level: Probably easy..
Number functions in the code strip: 1
State: Tested and works perfectly.
Requirements: No requirements

static public TimeSpan timeSinceThen(DateTime sentTime)
{
DateTime nowTime = System.DateTime.Now;
TimeSpan pastTime = nowTime.Subtract(sentTime);
return pastTime;
}

----------------------------------

Now something I need help with. I guess that the solution is pretty easy, but I didn't have much time for this function anyway...

Language: C#
Works with: Will work with every program.
Source used: LFS_External from the forums.
Result: Get days in the month.
Level: Probably easy..
Number functions in the code strip: 1
State: Not working - problems with February.

static public int daysInMonth(int Month, int Year)
{
switch (Month)
{
case 1: return 31;
case 2:
int visYearF = Year / 4;
float visYearI = Year / 4;
if (float.Parse(visYearF.ToString()) == visYearI)
{
return 29;
}
else
{
return 28;
}
case 3: return 31;
case 4: return 30;
case 5: return 31;
case 6: return 30;
case 7: return 31;
case 8: return 31;
case 9: return 30;
case 10: return 31;
case 11: return 30;
case 12: return 31;
}
return 33;
}

----------------------------------

Right after I finished writing the post and was about to click the Submit button - it reminded me of buttons! So there is another thing that could make your code more readable:

Language: C#
Works with: Will work with LFS_External from the forums.
Result: Display a sequence of buttons, and delete sequences.
Level: Probably easy..
Number functions in the code strip: 2
State: Working better than expected.
Note: Don't display too many buttons at once, or you may make your guest lose connection to the server..

static public void createSequence(string sequenceName, byte UCID, byte RequestID, clsConnection C)
{
switch (sequenceName.ToLower())
{
#region Test
case "test":
Form1.InSim.Send_BTN_CreateButton("test!", LFS_External.InSim.Flags.ButtonStyles.ISB_CLICK | LFS_External.InSim.Flags.ButtonStyles.ISB_LIGHT, 4, 4, 50, 50, 105, UCID, 40, false);
Form1.InSim.Send_BTN_CreateButton("", LFS_External.InSim.Flags.ButtonStyles.ISB_DARK, 100, 100, 50, 50, 101, UCID, 40, false);
Form1.InSim.Send_BTN_CreateButton("", LFS_External.InSim.Flags.ButtonStyles.ISB_LIGHT, 98, 24, 51, 125, 102, UCID, 40, false);
Form1.InSim.Send_BTN_CreateButton("test!", LFS_External.InSim.Flags.ButtonStyles.ISB_C2, 4, 76, 50, 50, 103, UCID, 40, false);
Form1.InSim.Send_BTN_CreateButton("test!", "Enter message", LFS_External.InSim.Flags.ButtonStyles.ISB_CLICK | LFS_External.InSim.Flags.ButtonStyles.ISB_LIGHT, 5, 7, 144, 118, 104, 104, UCID, 40, false);
break;
#endregion
}
}

static public void deleteSequence(string sequenceName, byte UCID)
{
byte startID = 0;
byte endID = 0;
switch (sequenceName.ToLower())
{
#region Test
case "test":
startID = 100;
endID = 155;
break;
#endregion
}

#region Proccess of deletion
if (startID < endID && endID > 1)
{
byte tempByte1 = startID;
while (tempByte1 <= endID)
{
Form1.InSim.Send_BFN_DeleteButton(LFS_External.Enums.BtnFunc.BFN_DEL_BTN, tempByte1, UCID);
tempByte1 += 1;
}
}
#endregion
}

There is a UCID - Used each time you display a button.
There is also clsConnection option - If you want to display buttons containing information about one player - with the UCID of another. UCID and clsConnection, of course - CAN be of the same person.

BTW: I never got to know what the RequestID of a button is used for... Proves what a lame coder I am lol! But people learn as long as they live, they say.

----------------------------------

That was some hot code from my program's kitchen. Now let us see something from yours.

::: I know that my post is a little bit confusing and I'm sorry. It's because I didn't take my time to structure the post and make the explanations sound more clear. So once again: I'm sorry if you don't understand something. You can always ask tho.

All the examples I gave you are simple and all you need is basic knowledge of coding to make them work.
broken
S3 licensed
Quote from tiagolapa :And creating useless threads in LFS forum. One more just minutes ago

Going to look for it now.
broken
S3 licensed
Quote from banshee56 :Proberly....

He is busy matening his servers now... It's a tough job, you know.
broken
S3 licensed
Quote from wild :One thing I've noticed is whenever someone questions him he never seems to reply to the topic for quite a while ..

He is a busy business man, what did you expect.
broken
S3 licensed
Quote from Naruto06 :i would like to know if anyone can post a string here for insim that only allows a specific person to use a command. currently all i want to do is make !happyhour on my insim so only i can activate it. THANKS!

if (Connections[GetConnIdx(MSO.UCID)].Username == "Naruto06") {
//Your code here
}

Upper code: Will work only for you username

Code below: Will work with your username or if the user is an admin. Hope I've(with the help and idea of Silox) helped.
if (Connections[GetConnIdx(MSO.UCID)].Username == "Naruto06" || Connections[GetConnIdx(MSO.UCID)].IsAdmin == 1) {
//Your code here
}

Note: Not tested, but it should work.
Someone correct me if something's wrong.

Fixed and added one more example: Thanks, Silox.
Last edited by broken, .
broken
S3 licensed
Quote from (The Stig) :
NewsLetter (UPDATED)

Hi guys, LCC servers are up and running 24/7 no insim atm due to problems connecting it to the servers and also some of you may have problems connecting to the actul servers due to a technical problem with the DNS Server at the ISP's base so we hope to get it sorted asap.

Problems, problems, problems. Excuses, excuses, excuses. I'd say - get your server and (own)insim fixed and finished and then put a server up, and start advertising it.
broken
S3 licensed
Quote from Tomba(FIN) :Stig, let me get a trial server. 30days, right?

Me too! Me too!
broken
S3 licensed
Quote from JasonJ :broken, the IP is available in the dedi file's log. Although you have to write specific code to scan the file and extract the IP's

Which will be a pain in the *** to code, and I still wouldn't have much faith in it.
And look at the OPs explanation, I'd say it really is impossible for him(at least for now ).
broken
S3 licensed
Yeah... I believe that the majority of people are aware that you can't just start a hosting business with renting a vps from somewhere and make a post(which actually has a lot of spelling mistakes) in some forum.... But that's (The Stig), with his 100 teams and 1 hosting "providing" service now.

And I would bet you a beer(if you were living in my city :P) that he doesn't have a FTP server.
broken
S3 licensed
Quote from boyracer1981 :Tornado Hosting cheaper than us or 500 Servers i dont think so

I don't think Tornado Hosting is actually providing something, since "they" gone off, before there was even a way to pay for a server.
broken
S3 licensed
Quote from geeman1 :True. The best would be if everybody just ignored threads like this.

But truth is that such threads are the ones, that sometimes get to be very popular.

....And now it's my fault, because I bumped it again. Damn it!
broken
S3 licensed
It's not C++, it's C#(unless you have something else, but I doubt it). And it does save the information already.
Getting the IP of a player is not possible(at least not yet).
FGED GREDG RDFGDR GSFDG