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