The online racing simulator
Searching in All forums
(58 results)
hmz.....
Bremskiller18akaHeinz
S2 licensed
I have the same problem
good question.....
Bremskiller18akaHeinz
S2 licensed


hm....
^^ thanx but this dont helps me.....

I think i must change anything on TotalDistance 1000 /

I have used TotalDistance 1000.0 /
than 1000 / 0.1
and much more i dont know.......

i want to show my driven km are in two words .....

is is now : KM BUTTON ON LFS: [ 6,345 ] KM
i wants so.. KM BUTTON ON LFS: [ 6,3 ] KM

hm...

i hope any one can understand me......
Bremskiller18akaHeinz
S2 licensed
DELETE THE RED MARKED CODES.........
Or change it so wh you want......


// Pit EXIT
int Speed = (int)((MCI.Info[i].Speed * (100f / 32768f)) * 3.6f);
if (((MCI.Info[i].X / 196608) <= -203) && ((MCI.Info[i].Y / 196608) >= -65) && ((MCI.Info[i].Y / 196608) <= -45) && (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInPitZone == 0))
{
if (((MCI.Info[i].Direction / 180) < 80) || ((MCI.Info[i].Direction / 180) > 280))
{
if (Speed > 3)
{
MCI_Update(MCI.Info[i].PLID);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInPitZone = 1;
InSim.Send_MST_Message("/msg ^6>^7 " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Username + " ^1was fined €200 for wrong way in pits");
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Cash -= 200;
}
}
}
if (((MCI.Info[i].Y / 196608) < -65) || ((MCI.Info[i].Y / 196608) > -45))
{
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInPitZone = 0;
MCI_Update(MCI.Info[i].PLID);
}

// Pit ENTRY
if (((MCI.Info[i].X / 196608) <= -203) && ((MCI.Info[i].Y / 196608) >= -158) && ((MCI.Info[i].Y / 196608) <= -145) && (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInPitZone2 == 0))
{
if (((MCI.Info[i].Direction / 180) < 80) || ((MCI.Info[i].Direction / 180) > 280))
{
if (Speed > 3)
{
MCI_Update(MCI.Info[i].PLID);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInPitZone2 = 1;
InSim.Send_MST_Message("/msg ^6>^7 " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Username + " ^1was fined €200 for wrong way out of pits");
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Cash -= 200;
}
}
}
if (((MCI.Info[i].Y / 196608) < -158) || ((MCI.Info[i].Y / 196608) > -145))
{
MCI_Update(MCI.Info[i].PLID);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInPitZone2 = 0;
}
Bremskiller18akaHeinz
S2 licensed
hm...... guy......

what do you want with a Register / Login system ?

on a cruise server ?

i think .....

when a player is joined the server
will the stats autosaved the first time in a .txt file
on a host or youre computer .......

is this true ?

sry but im understand this system what you want......
Bremskiller18akaHeinz
S2 licensed
Hi i hope to can help you.......

Change the RED MARKED INFOS.......




// UF1
if (Connections[GetConnIdx(MSO.UCID)].Cars.Contains("UF1"))
{
InSim.Send_MTC_MessageToConnection("^7UF1 - ^2€3000 ^1€2100^7 - ^2Owned", (MSO.UCID), (MSO.PLID));
}
else
{
if (Connections[GetConnIdx(MSO.UCID)].Cash >= 3000)
{
InSim.Send_MTC_MessageToConnection("^7UF1 - ^2€3000 ^1€2100^7 - ^2Have Enough", (MSO.UCID), (MSO.PLID));
}
if (Connections[GetConnIdx(MSO.UCID)].Cash < 3000)
{
InSim.Send_MTC_MessageToConnection("^7UF1 - ^2€3000 ^1€2100^7 - ^1Need €" + (3000 - Connections[GetConnIdx(MSO.UCID)].Cash), (MSO.UCID), (MSO.PLID));
}
}



AND THE CAR DEALER

case "UF1": return 8500;
Km Distance Rule
Bremskiller18akaHeinz
S2 licensed
Hello guys !

I have a problem with a Km distance rule

Here my code

InSim.Send_BTN_CreateButton("^7" + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance / 1000, Flags.ButtonStyles.ISB_C2, 4, 12, 145, 3, 162, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);

This shows my driven KM´s so :

KM: 6

so now i want to have its so :

KM: 6,1
KM: 6,2

i have used the code so this time : TotalDistance / 1000d
thats is a big fail because the d stands for double......

So i dont want hes
thats show me now :

KM: 6,232

Can everywhere help me please ?

SORRY FOR MY VERY BAD ENGLISH
vServer
Bremskiller18akaHeinz
S2 licensed
Hello guys

Can anyone help me please ?
i have bought a vserver to run my LFS server 24 / 7

How can i start the server ?
must i upload my LFS DEDI and the other files ?

Thanx

Heinz
Bremskiller18akaHeinz
S2 licensed
Hello guy

you need a lfs dedi server and Microsoft c++ or c#

have you this ?

download the basic insim on this forum
[NC] Giga Cruise
Bremskiller18akaHeinz
S2 licensed
WELCOME TO [GC] GIGA Cruise

SERVER : [GC] Giga-Cruise
Slot : 22
Host : To time Dedi ( Dont Have Money )
Gamemode : Roleplay / Cruise
Insim : The original was lfs_external_csf11 / I have changed all.
Website / Hp : http://gigacruise.npage.de/

-----------------------------------------------------------------------------------------------------------------------
FEATUERS
-----------------
Casino - Rob
Bank - Rob
Buy Parking Ticket
Buy Ice in a Icedeale
Buy Burger From Burgerking
Cop - Mission
Lotto
And more in Future !

GreetZ Seidel


Wowow
Bremskiller18akaHeinz
S2 licensed
THX ROBBO01 & ALL IS IT WORK !!!



------------------CLOSED------------------
when i add this .... is here an problem :( with word ?
Bremskiller18akaHeinz
S2 licensed
// If ISF_MCI flag is set, a set of IS_MCI packets is sent...

struct CompCar // Car info in 28 bytes - there is an array of these in the MCI (below)
{
word Node; // current path node
word Lap; // current lap
byte PLID; // player's unique id
byte Position; // current race position : 0 = unknown, 1 = leader, etc...
byte Info; // flags and other info - see below
byte Sp3;
int X; // X map (65536 = 1 metre)
int Y; // Y map (65536 = 1 metre)
int Z; // Z alt (65536 = 1 metre)
word Speed; // speed (32768 = 100 m/s)
word Direction; // direction of car's motion : 0 = word y direction, 32768 = 180 deg
word Heading; // direction of forward axis : 0 = word y direction, 32768 = 180 deg
short AngVel; // signed, rate of change of heading : (16384 = 360 deg/s)
};
okay thanx.....
Bremskiller18akaHeinz
S2 licensed
// If ISF_MCI flag is set, a set of IS_MCI packets is sent...

struct CompCar // Car info in 28 bytes - there is an array of these in the MCI (below)
{
word Node; // current path node
word Lap; // current lap
byte PLID; // player's unique id
byte Position; // current race position : 0 = unknown, 1 = leader, etc...
byte Info; // flags and other info - see below
byte Sp3;
int X; // X map (65536 = 1 metre)
int Y; // Y map (65536 = 1 metre)
int Z; // Z alt (65536 = 1 metre)
word Speed; // speed (32768 = 100 m/s)
word Direction; // direction of car's motion : 0 = world y direction, 32768 = 180 deg
word Heading; // direction of forward axis : 0 = world y direction, 32768 = 180 deg
short AngVel; // signed, rate of change of heading : (16384 = 360 deg/s)
};

// NOTE 1) Info byte - the bits in this byte have the following meanings :

^^Thats must all in my insim script ? under ?
sry i dont know
Bremskiller18akaHeinz
S2 licensed
^^ ?:jawdrop:
Coordinates
Bremskiller18akaHeinz
S2 licensed
Hello, I am ma again .....
need your help again I am sorry if I am so silly instead.

and

coordinaten how do I get out?
sample: here is the pit and that what should have been out house
or so.
but now I am missing the coordinaten you can see anywhere?
Thank you
hm..
Bremskiller18akaHeinz
S2 licensed
no i will add a second bank and have the code from the first bank copied
two banks I would like

but I still have a problem ....
how come I coordinates? (
Bremskiller18akaHeinz
S2 licensed
Thanx @ All For Help
hm.
Bremskiller18akaHeinz
S2 licensed
Sorry and thamx man !
^^^^^^
Bremskiller18akaHeinz
S2 licensed
lol ? i will add a new bank on my server ^^ and i have a problem with this code.
ISB_---->Codes
Bremskiller18akaHeinz
S2 licensed
Can anywhere all the codes from ISB_????

Here a Sample

InSim.Send_BTN_CreateButton("-", Flags.ButtonStyles.ISB_DARK, 5, 25, 0, 64, 171, NCN.UCID, 2, false);

i know (ISB_DARK^^ & ISB_C1 .........

Thanx & Greetz
Banks
Bremskiller18akaHeinz
S2 licensed
// This is for adding places such as bank, lotto, etc.

^This is from the script what is use häm...............
i have made copy this code and edit the Positon who is in game hm..... why that not work ? can any help me pls ?
PS. (-49 * & (-99 * = line 1, and the new coordinates.
i must rename INT BankDistance = (Name alredy in use ??)



//
// Bank
//
int BankDistance1 = ((int)Math.Sqrt(Math.Pow(MCI.Info[i].X - (-49 * 196608), 2) + Math.Pow(MCI.Info[i].Y - (-99 * 196608), 2)) / 65536);
if (BankDistance <= 200)
{
if ((MCI.Info[i].Speed / 147) <= 3)
{
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].CampFineBank += 1;
if (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].CampFineBank == 6)
{
InSim.Send_MTC_MessageToConnection("^6| ^7Please move away from the bank, or you will be fined!", Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 0);
InSim.Send_MTC_MessageToConnection("^6| ^7You have 20 seconds to move.", Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 0);
}
if (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].CampFineBank == 46)
{
InSim.Send_MST_Message("/msg ^6|^3 " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Username + " was fined €5 for camping!");
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].AddedBankTime += 600;
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Cash -= 5;
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].CampFineBank = 0;
}
}
}
else
{
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].CampFineBank = 0;
}

if (((MCI.Info[i].X / 196608) >= -190) && ((MCI.Info[i].X / 196608) <= -189) && ((MCI.Info[i].Y / 196608) >= -251) && ((MCI.Info[i].Y / 196608) <= -249) && ((MCI.Info[i].Speed / 147) <= 3) && (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsOfficerORCadet == 0))
{
if (OfficerOn == false)
{
if ((BankRobbable == false) && (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].AddedBankTime == 0) && (BankTimerCoolDown == 0))
{
if (BankChaseInProgress == 0)
{
for (byte b = 0; b < Players.Count; b++)
{
if (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[b].PLID)].UniqueID)].IsOfficerORCadet == 1)
{
if (BankChaseInProgress == 0)
{

switch (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].CurrentCar)
{
case "UF1":
TimerLength = 5;
break;

case "XFG":
TimerLength = 5;
break;

case "XRG":
TimerLength = 6;
break;

case "LX4":
TimerLength = 6;
break;

case "RAC":
TimerLength = 7;
break;

case "FXO":
TimerLength = 7;
break;

case "RB4":
TimerLength = 9;
break;

case "LX6":
TimerLength = 7;
break;

case "XRT":
TimerLength = 9;
break;

case "FZ5":
TimerLength = 9;
break;

case "UFR":
TimerLength = 10;
break;

case "XFR":
TimerLength = 10;
break;

case "FXR":
case "XRR":
case "FZR":
TimerLength = 12;
break;

case "MRT":
TimerLength = 7;
break;

case "FOX":
case "FBM":
case "FO8":
TimerLength = 12;
break;

case "BF1":
TimerLength = 15;
break;
}


BankCash = new Random().Next(2000, 7500);
InSim.Send_MST_Message("/msg ^6|^7 " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].PlayerName + "^7 (" + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Username + ") robbed the bank");
InSim.Send_MST_Message("/msg ^6|^7 and stole ^1€" + BankCash + "^7!");
InSim.Send_MST_Message("/msg ^6|^7 Car: " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].CurrentCar + " - Chase Timer: " + TimerLength);
BankChaseInProgress = 1;
RobberUCID = Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID;
BankTimer.Enabled = false;
}
}

foreach (clsConnection C in Connections)
{
if (C.IsOfficerORCadet == 1)
InSim.Send_MTC_MessageToConnection("^1BANK HAS BEEN ROBBED!!!", C.UniqueID, 0);
}
}
}
else if (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID != RobberUCID && Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsOfficerORCadet == 0 && Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInZone == 0)
{
InSim.Send_MTC_MessageToConnection("^1You cannot rob the bank while a robbery is in progress", Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 0);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInZone = 1;
}
}
else if (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInZone == 0)
{
InSim.Send_MST_Message("/msg ^6|^7 " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].PlayerName + "^7 (" + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].Username + ") tried to rob the bank");
InSim.Send_MST_Message("/msg ^6|^3 but is too stupid to rob.");
InSim.Send_MTC_MessageToConnection("^1You have been spotted by the bank", Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 0);
InSim.Send_MTC_MessageToConnection("^1Please try again later", Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 0);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].AddedBankTime += 600;
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInZone = 1;
}
}
else if (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInZone == 0)
{
InSim.Send_MTC_MessageToConnection("^1No officers on Duty this Time !", Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID, 0);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].IsInZone = 1;
}

}
Bremskiller18akaHeinz
S2 licensed
Please what? I have not made young
Thanx
Bremskiller18akaHeinz
S2 licensed
Thanx for help @ all
Bremskiller18akaHeinz
S2 licensed
// Detailed car information packet (max 8 per packet)
private void MCI_CarInformation(Packets.IS_MCI MCI)
{
try
{

for (int i = 0; i < Players.Count; i++)
{

InSim.Send_BTN_CreateButton("" + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance, Flags.ButtonStyles.ISB_C1, 5, 46, 60, 64, 199, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);
decimal SpeedMS = (decimal)(((MCI.Info[i].Speed / 32768f) * 100f) / 2);
Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance += Convert.ToInt32(SpeedMS);
decimal Speed = (decimal)((MCI.Info[i].Speed * (100f / 32768f)) * 3.6f);
decimal ConvSpeed = (decimal)(Speed * 25 / 1000);
Players[GetPlyIdx(MCI.Info[i].PLID)].Payout += ConvSpeed;
hm..
Bremskiller18akaHeinz
S2 licensed
if I go on my server that I can see how driven I am km ....
that is yes then displayed in a button
as my vehicles
..
Bremskiller18akaHeinz
S2 licensed
Sry for my bad english.....
FGED GREDG RDFGDR GSFDG