diff --git a/gamemode/core/derma/cl_quick.lua b/gamemode/core/derma/cl_quick.lua index 846b996b..0a8f5cfc 100644 --- a/gamemode/core/derma/cl_quick.lua +++ b/gamemode/core/derma/cl_quick.lua @@ -149,7 +149,6 @@ function PANEL:addSlider(text, callback, value, min, max, decimal) self.items[#self.items + 1] = slider return slider - end local color_dark = Color(255, 255, 255, 5) diff --git a/gamemode/core/libs/sh_chatbox.lua b/gamemode/core/libs/sh_chatbox.lua index 4ddb183e..f777a217 100644 --- a/gamemode/core/libs/sh_chatbox.lua +++ b/gamemode/core/libs/sh_chatbox.lua @@ -408,4 +408,4 @@ nut.chat.register("event", { }) -- Why does ULX even have a /me command? -hook.Remove("PlayerSay", "ULXMeCheck") +hook.Remove("PlayerSay", "ULXMeCheck") \ No newline at end of file diff --git a/gamemode/core/meta/inventory/sv_base_inventory.lua b/gamemode/core/meta/inventory/sv_base_inventory.lua index 1e7edc50..4f16d363 100644 --- a/gamemode/core/meta/inventory/sv_base_inventory.lua +++ b/gamemode/core/meta/inventory/sv_base_inventory.lua @@ -286,7 +286,7 @@ function Inventory:sync(recipients) net.WriteString(self.typeID) net.WriteTable(self.data) local items = {} - + local function writeItem(item) items[#items + 1] = { i = item:getID(), @@ -306,7 +306,7 @@ function Inventory:sync(recipients) --local currentBytes, currentBits = net.BytesWritten() --print("Current net message size: " .. currentBytes .. " bytes (" .. currentBits .. " bits)") - + local res = net.Send(recipients or self:getRecipients()) for _, item in pairs(self.items) do diff --git a/gamemode/core/sh_config.lua b/gamemode/core/sh_config.lua index d0407163..93271763 100644 --- a/gamemode/core/sh_config.lua +++ b/gamemode/core/sh_config.lua @@ -127,7 +127,7 @@ if (SERVER) then if (client:IsSuperAdmin() and type(nut.config.stored[key].default) == type(value) and hook.Run("CanPlayerModifyConfig", client, key) ~= false) then nut.config.set(key, value) - if (type(value) == "table") then + if (istable(value)) then local value2 = "[" local count = table.Count(value) local i = 1 @@ -248,7 +248,7 @@ if (CLIENT) then end -- VectorColor currently only exists for DProperties. - if (form == "Generic" and type(value) == "table" and value.r and value.g and value.b) then + if (form == "Generic" and istable(value) and value.r and value.g and value.b) then -- Convert the color to a vector. value = Vector(value.r / 255, value.g / 255, value.b / 255) form = "VectorColor" @@ -284,7 +284,6 @@ if (CLIENT) then elseif (form == "Boolean") then newValue = tobool(newValue) end - netstream.Start("cfgSet", k, newValue) end) end diff --git a/gamemode/shared.lua b/gamemode/shared.lua index ea1a940c..4e5583b3 100644 --- a/gamemode/shared.lua +++ b/gamemode/shared.lua @@ -3,7 +3,7 @@ GM.Name = "NutScript 1.2" GM.Author = "Chessnut, Black Tea and the NutScript team" GM.Website = "http://nutscript.net/" -nut.version = "1.2.2" +nut.version = "1.2.3" -- Fix for client:SteamID64() returning nil when in single-player. do diff --git a/plugins/nshud/sh_plugin.lua b/plugins/nshud/sh_plugin.lua index a9328e83..9dbe3004 100644 --- a/plugins/nshud/sh_plugin.lua +++ b/plugins/nshud/sh_plugin.lua @@ -127,6 +127,9 @@ function PLUGIN:DrawEntityInfo(entity, alpha, position) entity.nutDescCache = nil end + entity.nutNameCache = nil + entity.nutDescCache = nil + local name = hookRun("GetDisplayedName", entity, nil, "hud") or character.getName(character) if (name ~= entity.nutNameCache) then diff --git a/plugins/vendor/sv_hooks.lua b/plugins/vendor/sv_hooks.lua index 5d177994..52359a13 100644 --- a/plugins/vendor/sv_hooks.lua +++ b/plugins/vendor/sv_hooks.lua @@ -163,7 +163,7 @@ function PLUGIN:VendorTradeAttempt( client:notifyLocalized(err) client.vendorTransaction = nil end) - + nut.log.add(client, "vendorBuy", itemType, vendor:getNetVar("name")) end end