Skip to content

Commit

Permalink
Real-time update of settings in playerblips (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico8340 authored May 23, 2024
1 parent 4084e5d commit 9505b18
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions [gameplay]/playerblips/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

0 comments on commit 9505b18

Please sign in to comment.