From f9dd588e6a05c179b8ddd758f3f33f7c780d3fcc Mon Sep 17 00:00:00 2001
From: poco <107696090+poco8537@users.noreply.github.com>
Date: Tue, 10 Sep 2024 17:52:14 +0900
Subject: [PATCH 01/54] Add weather/cloud/time change security checks
---
vMenuServer/MainServer.cs | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/vMenuServer/MainServer.cs b/vMenuServer/MainServer.cs
index 9523c5992..d6069be13 100644
--- a/vMenuServer/MainServer.cs
+++ b/vMenuServer/MainServer.cs
@@ -660,8 +660,13 @@ private void RefreshWeather()
///
///
[EventHandler("vMenu:UpdateServerWeather")]
- internal void UpdateWeather(string newWeather, bool blackoutNew, bool dynamicWeatherNew, bool enableSnow)
+ internal void UpdateWeather([FromSource] Player source, string newWeather, bool blackoutNew, bool dynamicWeatherNew, bool enableSnow)
{
+ if (source != null && !IsPlayerAceAllowed(source.Handle, "vMenu.WeatherOptions.Menu") && !IsPlayerAceAllowed(source.Handle, "vMenu.WeatherOptions.All"))
+ {
+ BanManager.BanCheater(source);
+ return;
+ }
// Automatically enable snow effects whenever one of the snow weather types is selected.
if (newWeather is "XMAS" or "SNOWLIGHT" or "SNOW" or "BLIZZARD")
@@ -684,8 +689,14 @@ internal void UpdateWeather(string newWeather, bool blackoutNew, bool dynamicWea
///
///
[EventHandler("vMenu:UpdateServerWeatherCloudsType")]
- internal void UpdateWeatherCloudsType(bool removeClouds)
+ internal void UpdateWeatherCloudsType([FromSource] Player source, bool removeClouds)
{
+ if (source != null && !IsPlayerAceAllowed(source.Handle, "vMenu.WeatherOptions.RemoveClouds") && !IsPlayerAceAllowed(source.Handle, "vMenu.WeatherOptions.RandomizeClouds"))
+ {
+ BanManager.BanCheater(source);
+ return;
+ }
+
if (removeClouds)
{
TriggerClientEvent("vMenu:SetClouds", 0f, "removed");
@@ -705,8 +716,14 @@ internal void UpdateWeatherCloudsType(bool removeClouds)
///
///
[EventHandler("vMenu:UpdateServerTime")]
- internal void UpdateTime(int newHours, int newMinutes, bool freezeTimeNew)
+ internal void UpdateTime([FromSource] Player source, int newHours, int newMinutes, bool freezeTimeNew)
{
+ if (source != null && !IsPlayerAceAllowed(source.Handle, "vMenu.TimeOptions.Menu") && !IsPlayerAceAllowed(source.Handle, "vMenu.TimeOptions.All"))
+ {
+ BanManager.BanCheater(source);
+ return;
+ }
+
CurrentHours = newHours;
CurrentMinutes = newMinutes;
FreezeTime = freezeTimeNew;
From ba004978a535adee92378a396adcbef5da4afdd9 Mon Sep 17 00:00:00 2001
From: FRSTR-5M
Date: Fri, 11 Jul 2025 04:29:42 +0700
Subject: [PATCH 02/54] Added vehicle color preset menu
Implementation of a dynamic vehicle color preset selection submenu within the main color menu.
Also adding the use of the native prologue label for North Yankton license plate naming. Could be useful if the server owner wants to change the license plate names and overwrite the existing label.
Small fix to the Custom RGB color submenu arrows label to better match the rest of the menu style.
---
vMenu/menus/VehicleOptions.cs | 50 +++++++++++++++++++++++++++++++++--
1 file changed, 48 insertions(+), 2 deletions(-)
diff --git a/vMenu/menus/VehicleOptions.cs b/vMenu/menus/VehicleOptions.cs
index 19f29b6e0..d10a1a7a9 100644
--- a/vMenu/menus/VehicleOptions.cs
+++ b/vMenu/menus/VehicleOptions.cs
@@ -185,7 +185,7 @@ private void CreateMenu()
GetLabelText("CMOD_PLA_2"), // Plate Index 2 // BlueOnWhite3
GetLabelText("CMOD_PLA_3"), // Plate Index 3 // YellowOnBlue
GetLabelText("CMOD_PLA_4"), // Plate Index 4 // YellowOnBlack
- "North Yankton", // Plate Index 5 // NorthYankton
+ GetLabelText("PROL"), // Plate Index 5 // NorthYankton
GetLabelText("CMOD_PLA_6"), // Plate Index 6 // ECola
GetLabelText("CMOD_PLA_7"), // Plate Index 7 // LasVenturas
GetLabelText("CMOD_PLA_8"), // Plate Index 8 // LibertyCity
@@ -1028,6 +1028,14 @@ private void CreateMenu()
#endregion
#region Vehicle Colors Submenu Stuff
+ // presets menu
+ var presetColorsMenu = new Menu("Vehicle Colors", "Preset Colors");
+ MenuController.AddSubmenu(VehicleColorsMenu, presetColorsMenu);
+
+ var presetColorsBtn = new MenuItem("Preset Colors") { Label = "→→→" };
+ VehicleColorsMenu.AddMenuItem(presetColorsBtn);
+ MenuController.BindMenuItem(VehicleColorsMenu, presetColorsMenu, presetColorsBtn);
+
// primary menu
var primaryColorsMenu = new Menu("Vehicle Colors", "Primary Colors");
MenuController.AddSubmenu(VehicleColorsMenu, primaryColorsMenu);
@@ -1309,7 +1317,7 @@ async void HandleItemSelect(Menu menu, MenuItem menuItem, int itemIndex)
for (var i = 0; i < 2; i++)
{
- var customColour = new MenuItem("Custom RGB") { Label = ">>>" };
+ var customColour = new MenuItem("Custom RGB") { Label = "→→→" };
var pearlescentList = new MenuListItem("Pearlescent", classic, 0);
var classicList = new MenuListItem("Classic", classic, 0);
var metallicList = new MenuListItem("Metallic", classic, 0);
@@ -1353,6 +1361,44 @@ async void HandleItemSelect(Menu menu, MenuItem menuItem, int itemIndex)
secondaryColorsMenu.OnItemSelect += HandleItemSelect;
}
}
+
+ VehicleColorsMenu.OnItemSelect += (sender, item, index) =>
+ {
+ // When the color presets submenu is openend, update preset color items.
+ if (item == presetColorsBtn)
+ {
+ if (Game.PlayerPed.IsInVehicle())
+ {
+ presetColorsMenu.ClearMenuItems();
+ var veh = GetVehicle();
+ var VehicleColorCombinationsCount = GetNumberOfVehicleColours(veh.Handle);
+
+ for (int i = 0; i < VehicleColorCombinationsCount; i++)
+ {
+ var presetColor = new MenuItem($"Preset {i + 1}");
+ presetColorsMenu.AddMenuItem(presetColor);
+ }
+ }
+ else
+ {
+ VehicleColorsMenu.CloseMenu();
+ menu.OpenMenu();
+ }
+ }
+ };
+
+ presetColorsMenu.OnItemSelect += (sender, item, index) =>
+ {
+ var veh = GetVehicle();
+ if (veh != null && veh.Exists() && !veh.IsDead && veh.Driver == Game.PlayerPed)
+ {
+ SetVehicleColourCombination(veh.Handle, index);
+ }
+ else
+ {
+ Notify.Error("You need to be the driver of a driveable vehicle to change this.");
+ }
+ };
#endregion
#region Vehicle Doors Submenu Stuff
From 80daf9452ee5ed76a9109418e4344ed53649a10a Mon Sep 17 00:00:00 2001
From: Tylerg9822-sudo
Date: Tue, 2 Sep 2025 17:09:20 -0500
Subject: [PATCH 03/54] Update permissions.cfg
---
vMenuServer/config/permissions.cfg | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/vMenuServer/config/permissions.cfg b/vMenuServer/config/permissions.cfg
index 960eb4ae4..2b1f696ac 100644
--- a/vMenuServer/config/permissions.cfg
+++ b/vMenuServer/config/permissions.cfg
@@ -134,6 +134,17 @@ setr vmenu_sync_to_machine_time false
# You must be streaming the chameleon colours in order for this to function properly.
setr vmenu_using_chameleon_colours false
+# Setting this to true will prevent players from modifying vehicle extras to repair their vehicle when it is damaged.
+setr vmenu_prevent_extras_when_damaged false
+# This is the amount of engine damage before the extras will be blocked.
+setr vmenu_prevent_extras_engine_damage 800
+# This is the amount of body damage before the extras will be blocked.
+setr vmenu_prevent_extras_body_damage 800
+# Enabling this will show a notification when the player attempts to modify extras.
+setr vmenu_prevent_extras_notification_enabled true
+# This is the message that will be displayed when a player attempts to modify extras when the vehicle is damaged.
+setr vmenu_prevent_extras_notification_text "Vehicle is too damaged. Please visit a mechanic."
+
### MP Ped options ###
# Setting this to true will enable a 3D ped preview when viewing saved MP Peds.
setr vmenu_mp_ped_preview true
From bf3d449ec24be5bea66bfc972c596f08aaab57be Mon Sep 17 00:00:00 2001
From: Tylerg9822-sudo
Date: Tue, 2 Sep 2025 17:10:42 -0500
Subject: [PATCH 04/54] Update ConfigManager.cs
---
SharedClasses/ConfigManager.cs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/SharedClasses/ConfigManager.cs b/SharedClasses/ConfigManager.cs
index 26a0693d7..4ddba6894 100644
--- a/SharedClasses/ConfigManager.cs
+++ b/SharedClasses/ConfigManager.cs
@@ -38,6 +38,13 @@ public enum Setting
// Vehicle Chameleon Colours
vmenu_using_chameleon_colours,
+ // Vehicle Prevent Extras When Damaged
+ vmenu_prevent_extras_when_damaged,
+ vmenu_prevent_extras_engine_damage,
+ vmenu_prevent_extras_body_damage,
+ vmenu_prevent_extras_notification_enabled,
+ vmenu_prevent_extras_notification_text,
+
// MP Ped preview setting,
vmenu_mp_ped_preview,
From 3aae4fc999343a22bd3b25d4fdb8836d78c31ad2 Mon Sep 17 00:00:00 2001
From: Tylerg9822-sudo
Date: Tue, 2 Sep 2025 17:14:20 -0500
Subject: [PATCH 05/54] Update VehicleOptions.cs
---
vMenu/menus/VehicleOptions.cs | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/vMenu/menus/VehicleOptions.cs b/vMenu/menus/VehicleOptions.cs
index 19f29b6e0..58ab56506 100644
--- a/vMenu/menus/VehicleOptions.cs
+++ b/vMenu/menus/VehicleOptions.cs
@@ -1702,7 +1702,25 @@ async void HandleItemSelect(Menu menu, MenuItem menuItem, int itemIndex)
if (vehicleExtras.TryGetValue(item, out var extra))
{
var veh = GetVehicle();
- veh.ToggleExtra(extra, _checked);
+ if (veh != null && veh.Exists())
+ {
+ // If vmenu_prevent_extras_when_damaged is enabled, check vehicle engine and body health
+ if (GetSettingsBool(Setting.vmenu_prevent_extras_when_damaged) &&
+ (API.GetVehicleBodyHealth(veh.Handle) < GetSettingsInt(Setting.vmenu_prevent_extras_engine_damage) ||
+ API.GetVehicleEngineHealth(veh.Handle) < GetSettingsInt(Setting.vmenu_prevent_extras_body_damage)))
+ {
+ if (GetSettingsBool(Setting.vmenu_prevent_extras_notification_enabled))
+ {
+ Screen.ShowNotification(GetSettingsString(Setting.vmenu_prevent_extras_notification_text));
+ }
+
+ // Revert checkbox back to original state
+ ((MenuCheckboxItem)item).Checked = veh.IsExtraOn(extra);
+ return;
+ }
+
+ veh.ToggleExtra(extra, _checked);
+ }
}
};
#endregion
From 2af9319c05cc583ba1511043d3c6bf5e355c9083 Mon Sep 17 00:00:00 2001
From: Tylerg9822-sudo
Date: Tue, 2 Sep 2025 17:34:48 -0500
Subject: [PATCH 06/54] Update VehicleOptions.cs
---
vMenu/menus/VehicleOptions.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vMenu/menus/VehicleOptions.cs b/vMenu/menus/VehicleOptions.cs
index 58ab56506..4248c6bc1 100644
--- a/vMenu/menus/VehicleOptions.cs
+++ b/vMenu/menus/VehicleOptions.cs
@@ -3,6 +3,8 @@
using System.Linq;
using CitizenFX.Core;
+using CitizenFX.Core.Native;
+using CitizenFX.Core.UI;
using MenuAPI;
From 952d49bbeef828f76ab1981c0de35afbaeacfef8 Mon Sep 17 00:00:00 2001
From: Tylerg9822-sudo
Date: Sat, 6 Sep 2025 18:02:31 -0500
Subject: [PATCH 07/54] Update EventManager.cs to Fix Weather Syncing
Fixed Weather Syncing
---
vMenu/EventManager.cs | 4 ----
1 file changed, 4 deletions(-)
diff --git a/vMenu/EventManager.cs b/vMenu/EventManager.cs
index c0cc95f50..e4db2383b 100644
--- a/vMenu/EventManager.cs
+++ b/vMenu/EventManager.cs
@@ -284,10 +284,6 @@ private async Task UpdateWeatherParticles()
///
private async Task WeatherSync()
{
- if (MainMenu.WeatherOptionsMenu == null)
- {
- return;
- }
await UpdateWeatherParticles();
SetArtificialLightsState(IsBlackoutEnabled);
From 49d3646ecce8d17853597c25cb26711f4c2acb95 Mon Sep 17 00:00:00 2001
From: Tylerg9822-sudo
Date: Sat, 6 Sep 2025 18:07:23 -0500
Subject: [PATCH 08/54] Update EventManager.cs
fixed useless line
---
vMenu/EventManager.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/vMenu/EventManager.cs b/vMenu/EventManager.cs
index e4db2383b..7eb113a03 100644
--- a/vMenu/EventManager.cs
+++ b/vMenu/EventManager.cs
@@ -284,7 +284,6 @@ private async Task UpdateWeatherParticles()
///
private async Task WeatherSync()
{
-
await UpdateWeatherParticles();
SetArtificialLightsState(IsBlackoutEnabled);
SetArtificialLightsStateAffectsVehicles(!IsVehicleLightsEnabled);
From 1514ebca7685985b23cfbed990b3e82ae0b298c4 Mon Sep 17 00:00:00 2001
From: Tom <31419184+TomGrobbe@users.noreply.github.com>
Date: Sun, 7 Sep 2025 20:44:27 +0200
Subject: [PATCH 09/54] Update EventManager.cs
Fix Weather sync when players don't have access to WeatherOptionsMenu
---
vMenu/EventManager.cs | 5 -----
1 file changed, 5 deletions(-)
diff --git a/vMenu/EventManager.cs b/vMenu/EventManager.cs
index c0cc95f50..7eb113a03 100644
--- a/vMenu/EventManager.cs
+++ b/vMenu/EventManager.cs
@@ -284,11 +284,6 @@ private async Task UpdateWeatherParticles()
///
private async Task WeatherSync()
{
- if (MainMenu.WeatherOptionsMenu == null)
- {
- return;
- }
-
await UpdateWeatherParticles();
SetArtificialLightsState(IsBlackoutEnabled);
SetArtificialLightsStateAffectsVehicles(!IsVehicleLightsEnabled);
From 67600d707800398d2a56044c0346d2d42d9b3e1a Mon Sep 17 00:00:00 2001
From: Yauhen Pahrabniak
Date: Wed, 2 Jul 2025 11:26:07 +0200
Subject: [PATCH 10/54] Fix teleport to Player
---
vMenu/CommonFunctions.cs | 5 +++++
vMenu/MainMenu.cs | 42 +++++++++++++++++++++++++++++----------
vMenuServer/MainServer.cs | 12 ++++-------
3 files changed, 40 insertions(+), 19 deletions(-)
diff --git a/vMenu/CommonFunctions.cs b/vMenu/CommonFunctions.cs
index c4d6d6d0c..25dd04af8 100644
--- a/vMenu/CommonFunctions.cs
+++ b/vMenu/CommonFunctions.cs
@@ -423,6 +423,11 @@ public static async Task TeleportToPlayer(IPlayer player, bool inVehicle = false
else
{
playerPos = await MainMenu.RequestPlayerCoordinates(player.ServerId);
+ if (playerPos == Vector3.Zero)
+ {
+ Notify.Error("Could not retrieve the coordinates of the specified player. Teleport cancelled.");
+ return;
+ }
wasActive = false;
}
diff --git a/vMenu/MainMenu.cs b/vMenu/MainMenu.cs
index fcc5d037d..45f0d7086 100644
--- a/vMenu/MainMenu.cs
+++ b/vMenu/MainMenu.cs
@@ -369,26 +369,46 @@ public void ReceivedPlayerList(IList