when login begin loop_timer('costume_system_check', 0.3)
if pc.getqf('costume_system_main_active') == 1 then costume_system_update("part_main_old", pc.get_part(PART_MAIN))
pc.set_part(PART_MAIN, pc.getqf('costume_system_main_vnum')) cmdchat("CostumeMain "..pc.getqf('costume_system_main_vnum').."") end
if pc.getqf('costume_system_hair_active') == 1 then costume_system_update("part_hair_old", pc.get_part(PART_HAIR))
pc.set_part(PART_MAIN, pc.getqf('costume_system_hair_vnum')) cmdchat("CostumeHair "..pc.getqf('costume_system_hair_vnum').."") end
if pc.getqf('costume_system') == 1 then return
elseif pc.getqf('costume_system') ~= 1 then costume_system_create()
pc.setqf('costume_system', 1) end end
when costume_system_check.timer begin if pc.getqf('costume_system_main_active') == 1 and pc.get_part(PART_MAIN) ~= pc.getqf('costume_system_main_vnum') then pc.set_part(PART_MAIN, pc.getqf('costume_system_main_vnum')) end
if pc.getqf('costume_system_hair_active') == 1 and pc.get_part(PART_HAIR) ~= pc.getqf('costume_system_hair_vnum') then pc.set_part(PART_HAIR, pc.getqf('costume_system_hair_vnum')) end end
when 41001.use or 41002.use or 41003.use or 41004.use or 41005.use or 41006.use or 41007.use or 41008.use or 41009.use or 41010.use or 41011.use or 41012.use or 41013.use or 41014.use or 41015.use or 41016.use or 41017.use or 41018.use or 41019.use or 41020.use or 41021.use or 41022.use or 41023.use or 41024.use or 41025.use or 41026.use or 41027.use or 41028.use or 41055.use or 41056.use or 41057.use or 41058.use or 41059.use or 41060.use or 41061.use or 41062.use or 41063.use or 41064.use or 41065.use or 41066.use or 41067.use or 41068.use or 41069.use or 41070.use or 41071.use or 41072.use or 41073.use or 41074.use or 41075.use or 41076.use or 41077.use or 41078.use or 41079.use or 41080.use or 41081.use or 41082.use or 41083.use or 41084.use or 41085.use or 45001.use or 45002.use or 45003.use or 45004.use or 45005.use or 45006.use or 45007.use or 45008.use or 45009.use or 45010.use or 45021.use or 45022.use or 45023.use or 45024.use or 45025.use or 45026.use or 45027.use or 45028.use or 45029.use or 45030.use or 45031.use or 45032.use or 45033.use or 45034.use or 45035.use or 45036.use begin
local vnum = item.get_vnum() local hair_vnum = costume_system.get_real_hair_id(vnum)
if tonumber(vnum) > 41000 and tonumber(vnum) < 41085 then if pc.get_part(PART_MAIN) == vnum and pc.getqf('costume_system_main_active') == 1 then pc.set_part(PART_MAIN, (tonumber(costume_system_read("part_main_old")))) pc.setqf('costume_system_main_active', 0) pc.setqf('costume_system_main_vnum', 0) cmdchat("CostumeMain "..vnum.."") else costume_system_update("part_main_old", pc.get_armor())
pc.set_part(PART_MAIN, vnum) pc.setqf('costume_system_main_active', 1) pc.setqf('costume_system_main_vnum', vnum) cmdchat("CostumeMain "..vnum.."") end
elseif tonumber(vnum) > 45000 and tonumber(vnum) < 45037 then if pc.getqf('costume_system_hair_active') == 1 and pc.get_part(PART_HAIR) == hair_vnum then pc.set_part(PART_HAIR, (tonumber(costume_system_read("part_hair_old")))) chat((tonumber(costume_system_read("part_hair_old")))) pc.setqf('costume_system_hair_active', 0) pc.setqf('costume_system_hair_vnum', 0) cmdchat("CostumeHair "..vnum.."")
elseif pc.get_part(PART_HAIR) ~= hair_vnum and pc.getqf('costume_system_hair_active') == 1 then pc.set_part(PART_HAIR, hair_vnum) pc.setqf('costume_system_hair_vnum', hair_vnum) cmdchat("CostumeHair "..vnum.."") else costume_system_update("part_hair_old", pc.get_part(PART_HAIR))
pc.set_part(PART_HAIR, hair_vnum) pc.setqf('costume_system_hair_active', 1) pc.setqf('costume_system_hair_vnum', hair_vnum) cmdchat("CostumeHair "..vnum.."") end end end end end
when 41001.use or 41002.use or 41003.use or 41004.use or 41005.use or 41006.use or 41007.use or 41008.use or 41009.use or 41010.use or 41011.use or 41012.use or 41013.use or 41014.use or 41015.use or 41016.use or 41017.use or 41018.use or 41019.use or 41020.use or 41021.use or 41022.use or 41023.use or 41024.use or 41025.use or 41026.use or 41027.use or 41028.use or 41055.use or 41056.use or 41057.use or 41058.use or 41059.use or 41060.use or 41061.use or 41062.use or 41063.use or 41064.use or 41065.use or 41066.use or 41067.use or 41068.use or 41069.use or 41070.use or 41071.use or 41072.use or 41073.use or 41074.use or 41075.use or 41076.use or 41077.use or 41078.use or 41079.use or 41080.use or 41081.use or 41082.use or 41083.use or 41084.use or 41085.use or 45001.use or 45002.use or 45003.use or 45004.use or 45005.use or 45006.use or 45007.use or 45008.use or 45009.use or 45010.use or 45021.use or 45022.use or 45023.use or 45024.use or 45025.use or 45026.use or 45027.use or 45028.use or 45029.use or 45030.use or 45031.use or 45032.use or 45033.use or 45034.use or 45035.use or 45036.use begin
Это айди костюмов, которые у тебя будут работать, но у тебя есть 1 ошибка:
Код
if tonumber(vnum) > 41000 and tonumber(vnum) < 41085 then
Поставь
Код
if tonumber(vnum) > 41000 and tonumber(vnum) < 45037 then
Ибо костюмы начиная с 41085 айди работать не будут.