The online racing simulator
Searching in All forums
(16 results)
xhector
S2 licensed
Again i have problem that i dont know how to slove.


[COLOR=#0000ff][B]if[/B][/COLOR] (Conn.CompCar.X / [COLOR=#00008b]196608[/COLOR] >= -[COLOR=#00008b]227[/COLOR] && Conn.CompCar.X / [COLOR=#00008b]196608[/COLOR] <= -[COLOR=#00008b]262[/COLOR] && Conn.CompCar.Y / [COLOR=#00008b]196608[/COLOR] >= [COLOR=#00008b]283[/COLOR] && Conn.CompCar.Y / [COLOR=#00008b]196608[/COLOR] <= [COLOR=#00008b]305[/COLOR] || Conn.CompCar.X / [COLOR=#00008b]196608[/COLOR] >= -[COLOR=#00008b]233[/COLOR] && Conn.CompCar.X / [COLOR=#00008b]196608[/COLOR] <= -[COLOR=#00008b]215[/COLOR] && Conn.CompCar.Y / [COLOR=#00008b]196608[/COLOR] >= [COLOR=#00008b]285[/COLOR] && Conn.CompCar.Y / [COLOR=#00008b]196608[/COLOR] <= [COLOR=#00008b]303[/COLOR])
{ InSim.[COLOR=#191970][B]Send_BTN_CreateButton[/B][/COLOR]([COLOR=#0000ff]"^H^1^JЃҐ"[/COLOR], Flags.ButtonStyles.ISB_C2, [COLOR=#00008b]100[/COLOR], [COLOR=#00008b]100[/COLOR], [COLOR=#00008b]5[/COLOR], [COLOR=#00008b]0[/COLOR], [COLOR=#00008b]50[/COLOR], Conn.UniqueID, [COLOR=#00008b]2[/COLOR], [COLOR=#008b8b][B]false[/B][/COLOR]);
InSim.[COLOR=#191970][B]Send_BTN_CreateButton[/B][/COLOR]([COLOR=#0000ff]"^H^7^JЃҐ"[/COLOR], Flags.ButtonStyles.ISB_C2, [COLOR=#00008b]70[/COLOR], [COLOR=#00008b]70[/COLOR], [COLOR=#00008b]19[/COLOR], [COLOR=#00008b]15[/COLOR], [COLOR=#00008b]51[/COLOR], Conn.UniqueID, [COLOR=#00008b]2[/COLOR], [COLOR=#008b8b][B]false[/B][/COLOR]);
}

I want button to be deleted when im not inside of coordinates....
I tried with "else" after that
InSim.Send_BFN_DeleteButton
BUT when i make another area to createbutton the secound button not apear ....

xhector
S2 licensed
Quote from PoVo :Kyoto with a demo license? *cough cough*

Screenshot is from LFS of my friend
I will help anyone who wants signs too. Only i have to do delete button stuff and place sign in place where i want after i make it work like normal i can help.
xhector
S2 licensed
I understand now. Thanks again guys i will use coordinates. This Threat now can be closed if someone want to close it.
xhector
S2 licensed
Here is my first traffic sign that apear in area that i want but i dont make code for the area i just used created one "KinderGarten"
And the button with this character not closing becouse i have to add delete button code interesting!
xhector
S2 licensed
Ok PoVo , thank you but i can use only coordinates?
I want to make button who will apear in specific area
i will make polygon with
X/Y
X/Y coordinates when car is between there coordinates button will apear.. i dont need nodes right?
Because i dont know how to find the nodes
insim c# cruise, CarNode
xhector
S2 licensed
[COLOR=#0000ff][B]if[/B][/COLOR] (Conn.CompCar.Node > [COLOR=#00008b]242[/COLOR] && Conn.CompCar.Node < [COLOR=#00008b]270[/COLOR])

What mean 242 and 270. It is coordinate or what?
xhector
S2 licensed
Quote from MadCatX :-376 / 3 = -125
968 / 3 = 322

You are just soo smart... now its easy like 10x so 10x thx!!!! :goodvibes
xhector
S2 licensed
Quote from MadCatX :LFS Polygon draw
Not precisely what you want, but you can use it to find position coordinates on LFS track in a format used by LFS.

Here is the coordinates for one single point KinderGarten in Cruise:

[COLOR=#008000]
[/COLOR][COLOR=#ff0000][B]int[/B][/COLOR] KinderDist = (([COLOR=#ff0000][B]int[/B][/COLOR])Math.[COLOR=#191970][B]Sqrt[/B][/COLOR](Math.[COLOR=#191970][B]Pow[/B][/COLOR](Conn.CompCar.X - (-[COLOR=#00008b]125[/COLOR] * [COLOR=#00008b]196608[/COLOR]), [COLOR=#00008b]2[/COLOR]) + Math.[COLOR=#191970][B]Pow[/B][/COLOR](Conn.CompCar.Y - ([COLOR=#00008b]322[/COLOR] * [COLOR=#00008b]196608[/COLOR]), [COLOR=#00008b]2[/COLOR])) / [COLOR=#00008b]65536[/COLOR]);
[COLOR=#ff0000][B][/B][/COLOR]

Soo in cruise coordinates is
X: -125
Y: 322
But the map that you give me why show
X: -376
Y: 968

And i have to do this for map coordinates to fit with the cruise code
-376 * 65536 = 24641536 then 24641536 / 196608 = 125 that mean -125 why is happening like that ?
xhector
S2 licensed
I need this too. I want to find exact position where i can place button AND
i need position code to place object that will apear when the car is at... lets set 15 meters from specific position in one way...
i mean not to apear in radius of 15 meters but in one direction.
xhector
S2 licensed
Quote from misiek08 :Look in chinese characters for triangle.

OmG thats right i can use some characters and make them bigger as buttons

P.S OMG realy i found characters in traditional chinese for triangle and yield!!!!

Now remaining... how to place the signs in place that i want Im not lazy to learnin C# BUT tihs is my first project for fun and will be the last for that reason i trying with help from others

EDIT 2!!!!::
I Found how to find coordinates:
http://denisbatya.narod.ru/ This tool helped me!
Only coordinates in that tool do not match but becouse i have to do math with numbers
(-230 * 196608), 2) + Math.Pow(Conn.CompCar.Y - (106 * 196608), 2)) / 65536)
coordinates for the point A is X-230 and Y106 but in map is different soo i have to do:
numbers from tool * 65536 and the result i have to divide by 19608 and the result is coordinates for cruise
Why is that?


EDIT3:::
I dont know why coordinates from map tools is different from lfs cruise BUT
The forum user: MadCatX is helped me AGAIN with this

-376 / 3 = -125
968 / 3 = 322
This simple calculation convert coordinates from map to/from lfs cruise
Last edited by xhector, . Reason : PS
xhector
S2 licensed
Interesting... ok i have now idea how to do traffic lights and some of the signs.
I think signs will be easy to made. But how can i made triangle sign
or the yield sign...
So what i need here for signs...
I think i need code for creating the signs
code for place the sign at specific position... and thats it i think

Im giving up from traffic lights ...
How to delete buttons?
xhector
S2 licensed
This post originaly was for traffic lights or signs. I choose to make signs and i found help.
I did button (traffic sign) thats apear in specific region (area/polygon) but how to delete the sign when im outside of region/polygon?
Last edited by xhector, .
xhector
S2 licensed
You help did't help me BUT i was very mistaken i get ^1200 for 1200 kilometers i did't see the ^1 for color hahahaah omg im sooo BLIND!!!!
Anyway THANK ALL VERY MUCH for HELPING....
I'm noob in this c# and insim thing.. im helping myself with documentation for insim and from lfs forum....
Cruise Distance Check Problem
xhector
S2 licensed
Here is the code that checks our total distance:
[COLOR=#0000ff][B]if[/B][/COLOR] (NPL.CName == [COLOR=#0000ff]"XRG"[/COLOR] && Connections[[COLOR=#191970][B]GetConnIdx[/B][/COLOR](NPL.UCID)].TotalDistance / [COLOR=#00008b]1000[/COLOR] <= [COLOR=#00008b]199[/COLOR])
{
InSim.[COLOR=#191970][B]Send_MST_Message[/B][/COLOR]([COLOR=#0000ff]"/spec "[/COLOR] + Connections[[COLOR=#191970][B]GetConnIdx[/B][/COLOR](NPL.UCID)].Username);
[COLOR=#0000ff][B]if[/B][/COLOR] (Connections[[COLOR=#191970][B]GetConnIdx[/B][/COLOR](NPL.UCID)].MilesOrKilometers == [COLOR=#00008b]0[/COLOR])
{
InSim.[COLOR=#191970][B]Send_MTC_MessageToConnection[/B][/COLOR]([COLOR=#0000ff]"^6»^7 You need ^1200km ^7to drive a ^1"[/COLOR] + NPL.CName, NPL.UCID, [COLOR=#00008b]0[/COLOR]);
}

I dont understand this:
TotalDistance / [COLOR=#00008b]1000[/COLOR] <= [COLOR=#00008b]199[/COLOR])

The distance should be 1200 km but....
if my total distance is 100 km
100 / 1000 = 0.1 then if 0.1 mean 100 kilometers i have drive 200 000 km?!
xhector
S2 licensed
ok thx... moderators delete this thread
Last edited by xhector, .
Cruise mod
xhector
S2 licensed
Enybody know how to modify the cruise mod to save users information (Money,cars,goods) under IP address. I dont know how to modify the C++ Language only PHP... so anybody can help me?
FGED GREDG RDFGDR GSFDG