From 7cad75b520f5a38c0b8e38c326f40a6424fb101f Mon Sep 17 00:00:00 2001 From: creeper_kk Date: Tue, 5 May 2026 17:10:08 +0800 Subject: [PATCH] add stripknife map update 0505 --- 2001/ze_lotr_minas_tirith_cs2/stripknife.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 2001/ze_lotr_minas_tirith_cs2/stripknife.js diff --git a/2001/ze_lotr_minas_tirith_cs2/stripknife.js b/2001/ze_lotr_minas_tirith_cs2/stripknife.js new file mode 100644 index 0000000..c8367a3 --- /dev/null +++ b/2001/ze_lotr_minas_tirith_cs2/stripknife.js @@ -0,0 +1,21 @@ +import { Instance, CSGearSlot as CSGearSlot$1 } from 'cs_script/point_script'; + + +var CSGearSlot; +(function (CSGearSlot) { + CSGearSlot[CSGearSlot["INVALID"] = -1] = "INVALID"; + CSGearSlot[CSGearSlot["RIFLE"] = 0] = "RIFLE"; + CSGearSlot[CSGearSlot["PISTOL"] = 1] = "PISTOL"; + CSGearSlot[CSGearSlot["KNIFE"] = 2] = "KNIFE"; + CSGearSlot[CSGearSlot["GRENADES"] = 3] = "GRENADES"; + CSGearSlot[CSGearSlot["C4"] = 4] = "C4"; +})(CSGearSlot || (CSGearSlot = {})); + +Instance.OnScriptInput("StripKnife", (inputData) => { + let activator = inputData.activator; + Instance.Msg("[StripKnife]" + activator); + const knife = activator.FindWeaponBySlot(CSGearSlot$1.KNIFE); + if (knife) { + activator.DestroyWeapon(knife); + } +}); \ No newline at end of file