mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 13:53:45 +03:00
Upload
This commit is contained in:
23
gamemodes/darkrp/plugins/descriptionitems/cl_hooks.lua
Normal file
23
gamemodes/darkrp/plugins/descriptionitems/cl_hooks.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
--[[
|
||||
| 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
|
||||
Reference in New Issue
Block a user