Files
wnsrc/gamemodes/darkrp/plugins/descriptionitems/cl_hooks.lua
lifestorm 6a58f406b1 Upload
2024-08-04 23:54:45 +03:00

24 lines
735 B
Lua

--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function PLUGIN:PopulateCharacterInfo(client, character, tooltip)
local visibileItems = client:GetNetVar("visibleItems", {})
for itemName, _ in pairs(visibileItems) do
itemName = L(itemName)
local row = tooltip:AddRow("visibileItem_" .. itemName)
row:SetBackgroundColor(color_white)
row:SetText("They are carrying " .. (itemName[#itemName]:lower() == "s" and "" or itemName:match("^[aeiouAEIOU]") and "an " or "a ") .. itemName .. ".")
row:SizeToContents()
end
end