[TC] Gaming Forums
LFS Insim Programming - Locations - Printable Version

+- [TC] Gaming Forums (https://forum.city-driving.co.uk)
+-- Forum: Community Area (/forumdisplay.php?fid=14)
+--- Forum: Technology Area (/forumdisplay.php?fid=82)
+---- Forum: Tech Support (/forumdisplay.php?fid=85)
+---- Thread: LFS Insim Programming - Locations (/showthread.php?tid=11615)



LFS Insim Programming - Locations - Kriss - 2014-04-06 16:11

Hi, I need a bit help for locations inside C++. (for LFS)
The issue is that when I've added some locations around the map, the locations button starts blinking, and its not readable Tongue

Do you know how to solve this?
Here's an example from 1 location:

Code:
#region ' Roundabout & Bobs Market '
                            if ((Conn.CompCar.Node >= 337) && (Conn.CompCar.Node < 379))
                            {

                                #region ' Speedlimit 50kmh/31mph '
                                if (Conn.CompCar.Speed / 91 > 50)
                                {
                                    if (Conn.KMHorMPH == 0)
                                    {
                                        InSim.Send_BTN_CreateButton("^6Speed Limit: ^1" + Conn.CompCar.Speed / 91 + " kmh / 50 kmh", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK, 4, 25, 90, 172, 15, Conn.UniqueID, 2, false);
                                    }
                                    else
                                    {
                                        InSim.Send_BTN_CreateButton("^6Speed Limit: ^1" + Conn.CompCar.Speed / 146 + " mph / 31 mph", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK, 4, 25, 90, 172, 15, Conn.UniqueID, 2, false);
                                    }
                                    Conn.IsSpeeder = 1;
                                }
                                else
                                {
                                    if (Conn.KMHorMPH == 0)
                                    {
                                        InSim.Send_BTN_CreateButton("^6Speed Limit: ^2" + Conn.CompCar.Speed / 91 + " kmh / 50 kmh", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK, 4, 25, 90, 172, 15, Conn.UniqueID, 2, false);
                                    }
                                    else
                                    {
                                        InSim.Send_BTN_CreateButton("^6Speed Limit: ^2" + Conn.CompCar.Speed / 146 + " mph / 31 mph", Flags.ButtonStyles.ISB_LEFT | Flags.ButtonStyles.ISB_DARK, 4, 25, 90, 172, 15, Conn.UniqueID, 2, false);
                                    }
                                    Conn.IsSpeeder = 0;
                                }
                                #endregion
                                if (Conn.CompCar.X / 196608 >= 92 && Conn.CompCar.X / 196608 <= 102 && Conn.CompCar.Y / 196608 >= -162 && Conn.CompCar.Y / 196608 <= -153 || Conn.CompCar.X / 196608 >= 94 && Conn.CompCar.X / 196608 <= 97 && Conn.CompCar.Y / 196608 >= -161 && Conn.CompCar.Y / 196608 <= -153)
                                {
                                    InSim.Send_BTN_CreateButton("^3Bobs Market", Flags.ButtonStyles.ISB_DARK, 4, 25, 86, 172, 14, Conn.UniqueID, 2, false);
                                    Conn.Location = "Bobs Market";
                                    Conn.LastSeen = "Bobs Market, South City";
                                }
                                else
                                {
                                    #region ' Ahead Speedlimit '
                                    if (Conn.CompCar.Node > 370 && Conn.CompCar.Node < 374 && Conn.NextSpeedLimit == 0 && Conn.CompCar.Speed / 91 > 4) // Forward
                                    {
                                        if (Conn.CompCar.Direction / 180 < 70)
                                        {
                                            if (Conn.KMHorMPH == 0)
                                            {
                                                InSim.Send_BTN_CreateButton("^1(^780^1)", Flags.ButtonStyles.ISB_C2, 15, 20, 50, 145, 26, Conn.UniqueID, 2, false);
                                            }
                                            else
                                            {
                                                InSim.Send_BTN_CreateButton("^1(^750^1)", Flags.ButtonStyles.ISB_C2, 15, 20, 50, 145, 26, Conn.UniqueID, 2, false);
                                            }
                                            InSim.Send_BTN_CreateButton("^1London Rd. South Speed Limit", Flags.ButtonStyles.ISB_C2, 4, 25, 63, 143, 27, Conn.UniqueID, 2, false);
                                            Conn.NextSpeedLimit = 3;
                                        }
                                    }
                                    #endregion

                                    #region ' Ahead Speedlimit Reversed '
                                    if (Conn.CompCar.Node > 352 && Conn.CompCar.Node < 356 && Conn.NextSpeedLimit == 0 && Conn.CompCar.Speed / 91 > 4) // Reversed
                                    {
                                        if (Conn.CompCar.Direction / 180 < 70)
                                        {
                                            if (Conn.KMHorMPH == 0)
                                            {
                                                InSim.Send_BTN_CreateButton("^1(^780^1)", Flags.ButtonStyles.ISB_C2, 15, 20, 50, 145, 26, Conn.UniqueID, 2, false);
                                            }
                                            else
                                            {
                                                InSim.Send_BTN_CreateButton("^1(^750^1)", Flags.ButtonStyles.ISB_C2, 15, 20, 50, 145, 26, Conn.UniqueID, 2, false);
                                            }
                                            InSim.Send_BTN_CreateButton("^1London Rd. South Speed Limit", Flags.ButtonStyles.ISB_C2, 4, 25, 63, 143, 27, Conn.UniqueID, 2, false);
                                            Conn.NextSpeedLimit = 3;
                                        }
                                    }
                                    #endregion

                                    InSim.Send_BTN_CreateButton("^7Roundabout", Flags.ButtonStyles.ISB_DARK, 4, 25, 86, 172, 14, Conn.UniqueID, 2, false);
                                    Conn.Location = "Roundabout";
                                    Conn.LastSeen = "The Roundabout, South City";
                                }
                            }
                            #endregion



RE: LFS Insim Programming - Locations - Kriss - 2014-04-12 16:44

Its been 1 week now.
Anyone?


RE: LFS Insim Programming - Locations - Pete - 2014-04-12 16:56

The location button starts blinking. Elaborate. How often is it blinking and is it showing the same location every time it blinks or is it showing a different location and just flickering endlessly?


RE: LFS Insim Programming - Locations - Kriss - 2014-04-20 17:42

Its showing 2 different locations and it goes endless... Lets say it blinks with "Safe Area" which is the safe zone in the Pitlane & the "Highway".

Safe Area and Highway can blink endlessly.. I've also tried going around the map, but blinks where ever I go Tongue

Anyway.. There's nothing to do about it Tongue I deleted the insim. (got mad.)
but Thanks for the reply.