Skip to content

Commit

Permalink
playerblips: Fixed that when a player changed or joined teams the col…
Browse files Browse the repository at this point in the history
…or of the blip was not updated (#499)

* Player nametag colors should revert to team colors when the resource is stopped
* Added min_mta_version for server for the onPlayerTeamChange event
  • Loading branch information
T-MaxWiese-T committed Jun 15, 2024
1 parent 313f3dd commit ff80005
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion [gameplay]/playerblips/meta.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<meta>
<info name="Player Blips" author="Noki, jlillis" version="2.0.0" type="script" description="Attaches blips to players."/>
<info name="Player Blips" author="Noki, jlillis" version="2.1.0" type="script" description="Attaches blips to players."/>
<min_mta_version server="1.6.0-9.22447"/>
<oop>true</oop>
<script src="server/main.lua" type="server"/>
<settings>
Expand Down
5 changes: 4 additions & 1 deletion [gameplay]/playerblips/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ end)
addEventHandler("onPlayerSpawn", root, function()
createPlayerBlip(source)
end)
addEventHandler("onPlayerTeamChange", root, function()
createPlayerBlip(source)
end)

addEventHandler("onSettingChange", root,
function(settingName, settingValueEx, settingValue)
Expand All @@ -118,4 +121,4 @@ addEventHandler("onSettingChange", root,
blipRange = settingValue
end
end
)
)

0 comments on commit ff80005

Please sign in to comment.