Спешол фо ю, пришлось вспомнить натскрипт, будут ошибки скидываю сюда (ошибки именно по этой переделке).
***Скрытый текст не может быть процитирован.***
Вырезал повреждения одежды, так же ремонт и характеристики одежды. (Теперь просто одеждаа как в реальной жизни) Добавил, если игрок Жен. пола надевает Муж. скин, тогда он попросту не оденется и так же наоборот.
Крч либо я очень тупой,либо нет.
В sh_armour не закрывается эта строчка
ITEM.functions.Equip = {
name = "Equip",
tip = "equipTip",
icon = "icon16/tick.png",
onRun = function(item)
local client = item.player
local items = client:getChar():getInv():getItems()
client.armor = client.armor or {}
for k, v in pairs(items) do
if (v.id != item.id) then
local itemTable = nut.item.instances[v.id]
if item.armorclass == "cloth" and v.armorclass == "cloth" and v:getData("equip") then
client:notify("На Вас уже надета броня!")
return false
end
if (client.armor["cloth"] and item.armorclass == "cloth" and itemTable:getData("equip")) then
client:notify("Броня не сочетается с другой броней!")
return false
end
if (client:isFemale() and item.armorGender == "male" and item.armorclass == "cloth" and v:getData("equip")) then
-- если игрок Жен. тогда запрещаем надевать скин.
return false
elseif (!client:isFemale() and item.armorGender == "female" and item.armorclass == "cloth" and v:getData("equip")) then
-- если игрок Муж. тогда запрещаем надевать скин.
return false
end
end
end
client.armor[item.armorclass] = item
client:SetModel(item.SetModel)
client:getChar():setData("ArmorGender", item.armorGender)
item.player:EmitSound("items/ammo_pickup.wav", 80)
item:setData("equip", true)
client:setNetVar(item.armorclass, item)
return false
end,
onCanRun = function(item)
return (!IsValid(item.entity) and item:getData("equip") != true
end
}