The online racing simulator
use some trigger like
ticked_found = false

if ((MCI.Info[0].X >= 442) && (MCI.Info[0].Y >= 442) && !ticket_found)
{
ticket_found = true;
InSim.Send_MST_Message("/msg ^7You have found your daily lottery ticket!");
}

if start new lotto then reset ticket_found to FALSE
#27 - sun
would the trigger work ?

btw the flood part, only in my code i have

if ((MCI.Info[0].X >= 46176313) && (MCI.Info[0].Y >= 15915129))
{
InSim.Send_MST_Message(
"/msg test^3X " + MCI.Info[0].X);
InSim.Send_MST_Message(
"/msg test2^4Y " + MCI.Info[0].Y);
}

when i go over that co-ordinate would it say somthing ?

or would i have to build a rectangle so it will do it and it will be easier to get my ticket....


btw how do i get it to tell you how much cash you have got now in a _MTC_ ?

i only put this:

InSim.Send_MTC_MessageToConnection("^2you have " + Connections[GetConnIdx(MSO.UCID)].Cash + "^7£");
}


and its underlined it in Blue.

and the error is:

Error 1 No overload for method 'Send_MTC_MessageToConnection' takes '1' arguments C:\Documents and Settings\Owen\Desktop\Cruise Tutorial\Cruise Tutorial\LFS_External_Client\LFS_External_Client\Form1.cs 499 25 LFS_External_Client


Can any one help doing the MTC command ? i only know the MST, but that will show to all the players....
Maybe you should invest some time looking at examples and programming tutorials in general.

[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] ((MCI.Info[0].X >= 46176313) && (MCI.Info[0].Y >= 15915129)) ///this code verified the coordinates, good=send message : bad=no send
{
InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515]"/msg test^3X "[/COLOR][/SIZE][SIZE=2] + MCI.Info[0].X); ///this code send "test^3 -4228125845" ///the number is the coordinate X.
InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515]"/msg test2^4Y "[/COLOR][/SIZE][SIZE=2] + MCI.Info[0].Y);[/SIZE][SIZE=2] ///"test^4 -4228125845" ///the number is the coordinate Y.[/SIZE]
[SIZE=2] }
[/SIZE]

you need delete one line of the second part {} and delete + MCI.Info[0].X/Y
#30 - sun
Quote from ReVoX :

[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] ((MCI.Info[0].X >= 46176313) && (MCI.Info[0].Y >= 15915129)) ///this code verified the coordinates, good=send message : bad=no send[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515]"/msg test^3X "[/COLOR][/SIZE][SIZE=2] + MCI.Info[0].X); ///this code send "test^3 -4228125845" ///the number is the coordinate X.[/SIZE]
[SIZE=2]InSim.Send_MST_Message([/SIZE][SIZE=2][COLOR=#a31515]"/msg test2^4Y "[/COLOR][/SIZE][SIZE=2] + MCI.Info[0].Y);[/SIZE][SIZE=2] ///"test^4 -4228125845" ///the number is the coordinate Y.[/SIZE]
[SIZE=2]}[/SIZE]

you need delete one line of the second part {} and delete + MCI.Info[0].X/Y

ahhhhh.....Ok
Quote from AndroidXP :Maybe you should invest some time looking at examples and programming tutorials in general.

Don't even go there... you have no idea how many people have brought that up before you.
if ((MCI.Info[0].X >= 46176313) && (MCI.Info[0].Y >= 15915129))

I think you know that this method is wrong. You set undefined area (from this coordinate to infinity). You need use the box area.

(logical code)
function inArea(x,y, x_,y_)
{
if ((x >= x_-0.5*65536) && (x <= x_+0.5*65536) && (y >= y_-0.5*65536) && (y <= y_+0.5*65536)) { return true;}
else { return false;}
}

x_ticket = 46176313;
y_ticket = 15915129;

if ( inArea(MCI.Info[0].X, MCI.Info[0].Y, x_ticket, y_ticket) )
{

}

#33 - sun
.
#34 - sun
ok i've done it, Thanks for your help

YAY it says the message:
if ((MCI.Info[0].X >= -28705464) && (MCI.Info[0].Y >= 34620449)) ///this code verified the coordinates, good=send message : bad=no send
{
InSim.Send_MST_Message("/msg ^6You have found your daily lottery ticket!"); ///this code send "test^3 -4228125845" ///the number is the coordinate X.
}

that works !
all what i need to do now is for the rectangle and ReVoX said that you need to configure it
Can someone explain what he is on about ?
Quote from sun :Can someone explain what he is on about ?

LFS is a 3 dimensional world, but for what you want to do you can consider it to be 2 dimensional.

In order to reference any single point in a 2D world you need 2 points (coordinates), which are themselves typically defined as the X and Y, by their offset from a fixed position. i.e. the coordinates X = 1 and Y = 2 would mean that you're 1 unit by 2 units away from the origin (central point).

However, there are 2 problems with using a simple point for LFS - cars are not that small, and it would be tricky to be directly over a single point (since the coordinates from an MCI assume that a vehicle is also a single point), so you need to define a larger area, which is defined by the minimum of 2 sets of coordinates (unless you were making it a circular area, but lets not get into that).

What you're doing is seeing whether or not the vehicle is at or past your given point (-28705464, 34620449). What this means in practical terms is that you're simply going to end up with spamming the "You have found your daily lottery ticket!" message (in your example) on large tracks, once they've passed this point you've defined.

Basically what I'm trying to say, and give you as much information as possible, is that you're simply not doing what you think you're doing.
Quote from the_angry_angel :Basically what I'm trying to say, and give you as much information as possible, is that you're simply not doing what you think you're doing.

I could have told you that a long time ago

E: Also sun, please use
This is some code

tags please. It makes the code easier to read, and the post cleaner...
#37 - sun
Ok.

ye it kept spamming that mesage when i came up to a corner...

to give you somthing (maybe i should of told you) is that i want a rectangle so it doesnt have to take me ages to find those co-ordiante place to get my prize.
so rectangle and co-ordiantes. got the co-ordiantes but not the rectangle so i can go over and get my ticket
#38 - sun
Hi,

while its neally easter, i thought of making a count dowm.

can someone explain what i would need to do to order to code this count down ?
In a nut shell (well, very abstract psuedo code):

if (GetDateTime() - timeOfLastSend > packetInterval)
{
timeOfLastSend = GetDateTime()
timeRemaining = easterDateTime - timeOfLastSend
SendMsgPacket(timeRemaining)
}

#40 - sun
doesnt work...
That's because it pseudo code, not copy and pasteable code. You'll need to rewrite it to suit the rest of your program. I know that and I'm even worse at programming that you!
Quote from sun :doesnt work...

Quote :In a nut shell (well, very abstract psuedo code):

That's what happens when people who don't have the slightest clue about coding try to code.
#44 - sun
AndroidXP - If your not going to help, then LEAVE !

right made an application (windows app) count down.

i'am thinking on what i can put on my count down in LFS

if you want to help me, your welcome

or give me ideas xD
#45 - sun
PlyPayout to user
hi,

i've done my X bit so they pick up there ticket, but how do i get them to get £300 when they cash it in ?

i was wondering that the answer might be in the ply pay out when you earn cash while driving

Code:

Players[GetPlyIdx(MCI.Info[i].PLID)].Payout += ConvSpeed;

I might be wrong, but yet again i'am still learning

Regards Owen


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

Owner of

Owens Cruise Server

-----------------------
Payout is used so that the program knows when you have driven enough to have cash added. You want to use .Cash...

BTW, what's with the sig??
#47 - sun
ahh

Players[GetPlyIdx(MCI.Info[i].PLID)].Cash

or

Players[GetPlyIdx(MCI.Info[i].PLID)].Payout ?

BTW whats with the sig wtf ?
2

FGED GREDG RDFGDR GSFDG