The online racing simulator
KM Distance
1
(27 posts, closed, started )
KM Distance
Hello have a problem with the script insim

can think of a code of the driven distance post please ?
If you are using that open source cruise, it counts km ,just dont displays..
hm...
how can I make it show?
You said to krammeh that he cant code, then you should know it
:-(
:-( Sorry Krammeh i was bad ........

can anywhere please say whe can i create a driven Kmh counter ?
hm...
i am a very bad scripter and like LTC TC or others and i have x1 a question .....hate you me all ? [ Because ] - Im from germany or ? why

I SAY SORRY KRAMMEH

please give me a code who can i see the counter on my server .....
Quote from Bremskiller18akaHeinz :i am a very bad scripter and like LTC TC or others and i have x1 a question .....hate you me all ? [ Because ] - Im from germany or ? why

Iz it, 'coz I iz black? - Ali G, gotta love it

KMs are counted (rather roughly, as was pointed out), you can find it with Connections[GetConnIdx(UniqueID)].TotalDistance...
^^Thanx
Can i make a button who see anywhere the driven distance ?
huh what?
NewConn.TotalDistance = FileInfo.GetUserDistance(NCN.UName);
------------------------------------------------------------------


// 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++)
{
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... this is all what i have from Distance.....i will have a button to who can see i was driven 199.6 KM or so

..
Sry for my bad english.....
do you mean with
Quote :i will have a button to who can see i was driven 199.6 KM or so

That you want the button?

in that case, improve me if i am wrong, you just put this:
InSim.Send_BTN_CreateButton("" + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance, Flags.ButtonStyles.ISB_C1, 5, 25, 0, 64, 199, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);

That should work
hm..
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
Read my edit
// 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;
do you have to do anything like * 25 / 1000?
The TotalDistance is in metres btw
oh... ok
InSim.Send_BTN_CreateButton("KM: " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance / 1000, Flags.ButtonStyles.ISB_C1, 5, 25, 0, 64, 199, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);

That is what he wants.
Thanx
Thanx for help @ all
Quote from shaun463 :
InSim.Send_BTN_CreateButton("KM: " + Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].TotalDistance / 1000, Flags.ButtonStyles.ISB_C1, 5, 25, 0, 64, 199, (Connections[GetConnIdx(Players[GetPlyIdx(MCI.Info[i].PLID)].UniqueID)].UniqueID), 2, false);

That is what he wants.

i know, i already gave him that
No you didn't, you gave him a metre counter I gave him a KM counter (note the / 1000).
Quote from Bremskiller18akaHeinz :.....hate you me all ? [ Because ] - Im from germany or ? why

yeah i remember some racist comments made by you a while ago ingame, so indeed... maybe you should move to a country where you´re wanted
Please what? I have not made young
the hell are you even trying to say?!
1
This thread is closed

KM Distance
(27 posts, closed, started )
FGED GREDG RDFGDR GSFDG