Skip to content

Commit

Permalink
Merge pull request #6 from Tsunder/master
Browse files Browse the repository at this point in the history
check for player exisentialism on initialize
  • Loading branch information
dirtyredz authored Jan 24, 2018
2 parents 37d0f68 + 7ffa64b commit e5995e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions mods/MoveUI/scripts/player/MoveUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ exsist, MoveUIConfig = pcall(require, 'MoveUIConfig')
MoveUILoader.HudList = MoveUIConfig.HudList or {}

function MoveUILoader.initialize()
if onServer() then
if onServer() and Player() then
local player = Player()
for _,HudFile in pairs(MoveUILoader.HudList) do
if HudFile.FileName and HudFile.ForceStartEnabled then
if HudFile.Restriction(player) then
player:addScriptOnce("mods/MoveUI/scripts/player/"..HudFile.FileName..".lua")
player:sendChatMessage('MoveUI', 0, HudFile.FileName .. " Enabled!")
--player:sendChatMessage('MoveUI', 0, HudFile.FileName .. " Enabled!")
else
player:removeScript("mods/MoveUI/scripts/player/"..HudFile.FileName..".lua")
player:sendChatMessage('MoveUI', 1, "You do not have permission to do that!")
--player:sendChatMessage('MoveUI', 1, "You do not have permission to do that!")
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion mods/MoveUI/scripts/player/ScrapyardLicenses.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function ScrapyardLicenses.TableSize(tabl)
end

function ScrapyardLicenses.onPreRenderHud()
if onClient() then
if onClient() and Player() then

if OverridePosition then
rect.position = OverridePosition
Expand Down

0 comments on commit e5995e6

Please sign in to comment.