add sborka

This commit is contained in:
2026-03-31 10:27:04 +03:00
commit f5e5f56c84
2345 changed files with 382127 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
local PLUGIN = PLUGIN
netstream.Hook("ixWritingEdit", function(client, itemID, text)
text = tostring(text):sub(1, PLUGIN.maxLength)
local character = client:GetCharacter()
local item = ix.item.instances[itemID]
-- we don't check for entity since data can be changed in the player's inventory
if (character and item and item.base == "base_writing") then
local owner = item:GetData("owner", 0)
if ((owner == 0 or owner == character:GetID()) and text:len() > 0) then
item:SetText(text, character)
end
end
end)