The online racing simulator
Searching in All forums
(407 results)
vane
S3 licensed
i accidently added a form to my project then deleted it but now i cant debug my project or run it at all, could someone help me?
vane
S3 licensed
what would be much, much, much more entertaining would be to get them to keep their throttle on permanently and they all whack into the wall at the end
vane
S3 licensed
i have had an idea that would knock it down to two screens. Have a curved screen at the front and a curved screen at the back, then have projectors pointing at them. Adjust the field of view so you don't get out of proportion view. Because they are gonna be curved, the left and right side of light would hit the screen quicker and it would be closer than the light coming from the centre so changing the field of view would work. you may need to adjust the angle of the curvature of the screens. just a suggestion, i will draw a diagram some how if you like

OR

get a set of video goggles and a TrackIR set much cheaper than buying two £1000 projectors
vane
S3 licensed
if this has been said before please link me, i would love to hear other people opinion...
vane
S3 licensed
excuse me?
an open track to design your own layout
vane
S3 licensed
What i have always really though would be good would be a track that turned up with all the other track like fe1 and fe2 but it has all the parts of all the fernbay tracks so that you can design your own layout with the same for the other tracks like aston and south city
vane
S3 licensed
ill give you a very non productive answer, think protected bytes...
vane
S3 licensed
i keep getting a problem from this, i have included a screenshot of the debugging problem, could you suggest a place in the code that could be causing it? i have added extra buttons onto the form1 for the admin password and ip address etc

EDIT: when i switched computers it started working :s nevermind about it
Last edited by vane, .
vane
S3 licensed
but if sun can correct it, anyone could correct it
vane
S3 licensed
i have a very basic understanding of C# but i reckon i could get a button that shows your angle
vane
S3 licensed
is there a piece of data in the MCI.Info bit about which set of 8 it is so you can do more than 8? so if there is more than 8 players/connections

EDIT: i have found this in the insim .txt

"#define CCI_FIRST 64 // this is the first compcar in this set of MCI packets
#define CCI_LAST 128 // this is the last compcar in this set of MCI packets

// NOTE 2) Heading : 0 = world y axis direction, 32768 = 180 degrees, anticlockwise from above
// NOTE 3) AngVel : 0 = no change in heading, 8192 = 180 degrees per second anticlockwise

struct IS_MCI // Multi Car Info - if more than 8 in race then more than one of these is sent
{
byte Size; // 4 + NumP * 28
byte Type; // ISP_MCI
byte ReqI; // 0 unless this is a reply to an TINY_MCI request
byte NumC; // number of valid CompCar structs in this packet

CompCar Info[8]; // car info for each player, 1 to 8 of these (NumC)"

could someone try their best to explain how you would get all their info up past 8
Last edited by vane, .
vane
S3 licensed
i understand how to get it to come up on certain player's screens (record the admins), but i dont know how to get the actual info, i tried doing e.g a button for a username [0] one for [1] [2] [3] [4] etc, but what would you do when you reach 8?
also, is there a bit that is like an integer(int) except it sends text instead of numbers, is this a string?
what i mean is if you wantri a whole number you put an 'int' infront of it and 'decimal' infront if you want a decimal but do you need to put anything if it is for text?
vane
S3 licensed
I have had great fun learning to code, i may be wrong but am i the only "crazed guy who wants to make a cruise server" who has bothered to try and learn? except of course for bose
vane
S3 licensed
this only leaves one question though...







WHY WAS THIS NOT DONE SOONER!!! i love it!!! well done programmers lfs no longer looks like pixel art, one step closer to realistic views
vane
S3 licensed
post the code up
vane
S3 licensed
oh yeah of course the code here it is
foreach (clsPlayer Ply in Players)
for (int i = (MCI.Info[0].PLID); i < Players.Count; i++)
{
InSim.Send_BTN_CreateButton((MCI.Info[i].Speed / 145) + "MPH", Flags.ButtonStyles.ISB_DARK, 5, 20, 80, 170, 110, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 111, false);
InSim.Send_BTN_CreateButton((MCI.Info[i].Speed / 91) + "KM/H", Flags.ButtonStyles.ISB_DARK, 5, 20, 85, 170, 112, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 113, false);
InSim.Send_BTN_CreateButton("^1X: " + (MCI.Info[i].X), Flags.ButtonStyles.ISB_DARK, 5, 20, 90, 170, 114, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 115, false);
InSim.Send_BTN_CreateButton("^2Y: " + (MCI.Info[i].Y), Flags.ButtonStyles.ISB_DARK, 5, 20, 95, 170, 116, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 117, false);
InSim.Send_BTN_CreateButton("^7Section: " + (MCI.Info[i].Node), Flags.ButtonStyles.ISB_DARK, 5, 20, 100, 170, 118, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 119, false);
if ((MCI.Info[i].Node >= 136) && (MCI.Info[i].Node <= 188))
InSim.Send_BTN_CreateButton("^2Location: CorkScrew", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 188) && (MCI.Info[i].Node <= 230))
InSim.Send_BTN_CreateButton("^2Location: Sharpe Corner", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 230) && (MCI.Info[i].Node <= 288))
InSim.Send_BTN_CreateButton("^2Location: Vane Lane", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 288) && (MCI.Info[i].Node <= 320))
InSim.Send_BTN_CreateButton("^2Location: The HammerHead", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 320) && (MCI.Info[i].Node <= 360))
InSim.Send_BTN_CreateButton("^2Location: Road 328", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 360) && (MCI.Info[i].Node <= 407))
InSim.Send_BTN_CreateButton("^2Location: Drift Corner", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 407) && (MCI.Info[i].Node <= 491))
InSim.Send_BTN_CreateButton("^2Location: Road 485", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 491) && (MCI.Info[i].Node <= 581))
InSim.Send_BTN_CreateButton("^2Location: The Curves", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 581) && (MCI.Info[i].Node <= 691))
InSim.Send_BTN_CreateButton("^2Location: The Big W", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 0) && (MCI.Info[i].Node <= 34))
InSim.Send_BTN_CreateButton("^2Location: The Big W", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
if ((MCI.Info[i].Node >= 34) && (MCI.Info[i].Node <= 136))
InSim.Send_BTN_CreateButton("^2Location: The Dire Straits", Flags.ButtonStyles.ISB_DARK, 10, 40, 70, 150, 120, MCI.Info[GetConnIdx(Ply.PlayerID)].PLID, 121, false);
}

i tried millions of combinations but it never worked :s
vane
S3 licensed
anyone have a fix for it? *bump *
vane
S3 licensed
i have got some buttons saying the location of yourself coming up but they only come up on the first person out of the pits, unless they spectate then join again, how could i get around this?
if two people left the pits the second person has the first persons MCI information like co-ordinates, could someone help me?
vane
S3 licensed
Quote from the_angry_angel :For the love of god, use NumC from the MCI packet (I assume this is made accessible by LFS_External). Not that bullshit System.Math...

Edit: Or DarkTimes' example below using a foreach loop

i have found the MCI.NumC bit i just dont understand what kind of layout you have to put it in, some extra detail would be appreciated
vane
S3 licensed
Quote from DarkTimes :I may be way off track, but surely it makes more sense to iterate over the CompCars rather than the players...


void MCI(Packets.IS_MCI MCI)
{
foreach (Packets.CompCar info in MCI.Info)
{
decimal speed = (decimal)((info.Speed * (100f / 32768)) * 3.6);
decimal convSpeed = (decimal)(speed * 25 / 1000);
Players[GetPlyIdx(info.PLID)].Payout = convSpeed;
}
}

As far as I can see, that should work.

Edit: Incidentally, and this really, really bugs me, local variable and field names in C# should be lower-case, to distinguish them from methods and properties. <-- pedantic.

that method does not have the meaning of 'i' in it
vane
S3 licensed
ah thanks ill try it

EDIT: it still crashes, but it takes more goes, hmm
vane
S3 licensed
i started debugging, then kept joining with a car i didn't own, i think this may be what is causing it to crash
vane
S3 licensed
to save having to do all that could i not just send him the debug folder?
vane
S3 licensed
i think i may have been unclear, i am the one who is coding it and compiling (building) it then sending it to him to run on the server, i am using microsoft C# 2005 express edition
vane
S3 licensed
im not claiming to be any better but i think the insim in that server could be improved a lot
FGED GREDG RDFGDR GSFDG