The online racing simulator
Searching in All forums
(474 results)
sun
S2 licensed
what are the errors ?

we cant help you unless we know.
Detecting the nearest people to you
sun
S2 licensed
Hi, i tried looking for Seans post about this but couldnt find it any where...

I'am trying to detect the nearest people to you, is this possiable ?

if any one can help, please post.
sun
S2 licensed
Thanks Rob, you might want to check the if statement because i had errors on that. the button code works but when your not an admin it displays Admin 0. But when you are an admin it shows Admin 1.
sun
S2 licensed
Thanks Rob, it helped me

but i get an error when i put this in the NCN packet

InSim.Send_BTN_CreateButton("^7Admin" + Connections[GetConnIDX(UCID)].IsAdmin, NCN.UCID, 0);

i'am trying to check if someones an admin, then display a button so they know they are
Last edited by sun, .
sun
S2 licensed
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
sun
S2 licensed
never mind, done it my self :chairs:
sun
S2 licensed
ok heres all the information it says, (a better view)
Last edited by sun, .
sun
S2 licensed
Hi people,

i have an error with LFS mail when it try's and conects to my insim.

heres the problem.


Please can someone help me ?

Regards Owen.
Last edited by sun, .
sun
S2 licensed
doesnt work...
sun
S2 licensed
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 ?
sun
S2 licensed
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
sun
S2 licensed
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 ?
Last edited by the_angry_angel, . Reason : Tidier and easier to read.
sun
S2 licensed
.
Last edited by sun, .
sun
S2 licensed
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
sun
S2 licensed
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....
sun
S2 licensed
InSim.Send_MST_Message("/msg ^3X " + MCI.Info[0].X);
InSim.Send_MST_Message("/msg ^4Y " + MCI.Info[0].Y);

what does that do ?

do you mean

InSim.Send_MST_Message("X: " + MCI.Info[0].X);
InSim.Send_MST_Message("Y: " + MCI.Info[0].Y);
sun
S2 licensed
ahh ok

so when you go over it it will say the msg ?
sun
S2 licensed
Originally Posted by AndroidXP
To be honest, I really don't understand what that code is supposed to do. Especially the if statements that just end with a semicolon, thus doing nothing.

If you want to check if the player is within a certain "box" on the track, then you first have to define the coordinates of the box, like this:

Code:
Rectangle box = new Rectangle();box.Top = 6 * 65536; //6 metres to the north of the track centre pointbox.Left = 3 * 65536; //3 metres to the eastbox.Right = 6 * 65536; //6 metres to the eastbox.Bottom = 3 * 65536; //3 metres to the north ... or you do it with coordinates and width/height box.X = 3 * 65536; //3 metres eastbox.Y = 6 * 65536; //6 metres northbox.Width = 3 * 65536; //3 metres box.Height= 3 * 65536; //3 metres ... respectively negative values if you want to go to south/west


Is that VB code or C# ?

i tryed it and it didnt work

do you mean the if statement then the Rectangle Box = new Rectangle();

the rest here



Regards, Owen
sun
S2 licensed
hi,

Thanks for that.

i have to say but '-=STG=- City Cruise' are saying that that insim is theres and that one of them made it, but its just downloaded off the forum.

Just thought i would tell you.

I downloaded the file, but i edited it and it says who made it so really its like 50 50.

Thanks for that Karl

its taught me a heck of alot...
sun
S2 licensed
ok

Error 2 The name 'Box' does not exist in the current context C:\Documents and Settings\Owen\Desktop\Cruise Tutorial\LFS_External_Client\LFS_External_Client\Form1.cs 565 17 LFS_External_Client

if (box.Contains(MCI.Info[0]

theres somthing wrong with the 'box' thing
sun
S2 licensed
ok,

when i do my lotto ], i might do a bank to, but that might be in the future when i'am better at programming....
sun
S2 licensed
So that code of mine doesnt do nothing ?
sun
S2 licensed
only yes or no on this : P

would
if
((MCI.Info[0].X == 3)&(MCI.Info[0].Y == 3));

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

that code work if i go inside the 3 boxes
if ((MCI.Info[0].X == 3)&(MCI.Info[0].Y == 3));


would it say You have found your daily lottery ticket!

?


sun
S2 licensed
Thanks for the help guys
sun
S2 licensed
Thanks,

But now its underlined
& (MCI.Info[0].Y == 3);


FGED GREDG RDFGDR GSFDG