From 9505b181fe7fc2bab53142746f73bc64a8fd984d Mon Sep 17 00:00:00 2001 From: Nico <122193236+Nico8340@users.noreply.github.com> Date: Fri, 24 May 2024 01:47:56 +0200 Subject: [PATCH] Real-time update of settings in playerblips (#480) --- [gameplay]/playerblips/server/main.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/[gameplay]/playerblips/server/main.lua b/[gameplay]/playerblips/server/main.lua index 5849c1c56..32bf2eab3 100644 --- a/[gameplay]/playerblips/server/main.lua +++ b/[gameplay]/playerblips/server/main.lua @@ -101,3 +101,21 @@ end) addEventHandler("onPlayerSpawn", root, function() createPlayerBlip(source) end) + +addEventHandler("onSettingChange", root, + function(settingName, settingValueEx, settingValue) + if settingName == "*use_team_colors" then + useTeams = settingValue == "true" + elseif settingName == "*use_nametag_colors" then + useNametags = settingValue == "true" + elseif settingName == "*blip_size" then + blipSize = settingValue + elseif settingName == "*blip_alpha" then + blipAlpha = settingValue + elseif settingName == "*blip_color" then + color = settingValue + elseif settingName == "*blip_range" then + blipRange = settingValue + end + end +) \ No newline at end of file