> For the complete documentation index, see [llms.txt](https://kbanimation.gitbook.io/kbanimation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbanimation.gitbook.io/kbanimation/q-and-a.md).

# Q\&A

{% tabs %}
{% tab title="EN" %}

## ❓ FAQ & Troubleshooting

A compilation of answers and troubleshooting guides for common integration problems.

<details>

<summary>My weapon model does not appear in-game.</summary>

* Verify that `model-id` inside your weapon YML configuration (under `models/`) matches the exact identifier registered in the BetterModel plugin.
* Check that the file's `weapon-title` field matches the exact case-sensitive Weapon ID inside your WeaponMechanics configuration files.
* Execute `/bettermodel reload` followed by `/kba reload` to clear cache.

</details>

<details>

<summary>The Selective Fire mode HUD displays wrong status (e.g. S shows as A).</summary>

* The plugin extracts active fire mode information directly from the WeaponMechanics weapon NBT tag. If that is missing, it falls back to the default Selective\_Fire configuration list. Check your WeaponMechanics gun configuration for correct Selective\_Fire priorities.

</details>

<details>

<summary>The weapon model stays visible for a moment after swapping slots.</summary>

* If the weapon configuration maps an `unequip` animation, the plugin waits 10 server ticks (0.5 seconds) to allow the animation to play before deleting the entity. If you want the gun to disappear instantly, simply remove the `unequip` animation section block from your weapon YML config.

</details>

<details>

<summary>Why does Customization Mode cancel when players take damage?</summary>

* For balance, players must not customize guns during active combat. The plugin listens for damage events and player death. If either is triggered, it cancels the customization session, unfreezes the player's movement, and returns them to normal play.

</details>

<details>

<summary>How many active players can this plugin handle?</summary>

* The model tracker uses client-side entities with view ranges limited to `0.0125f` (only players holding the gun see the animation). This light load enables servers to scale to 500+ active slots without ticks-per-second drops.

</details>
{% endtab %}

{% tab title="TH" %}

## ❓ คำถามที่พบบ่อย & วิธีการแก้ปัญหา

รวบรวมปัญหาที่มักพบบ่อยในการตั้งค่าปลั๊กอิน แอนิเมชันปืน และระบบการจัดการ HUD พร้อมวิธีตรวจสอบแก้ไข:

<details>

<summary>ทำไมโมเดลปืน 3 มิติไม่โชว์ในเกมตอนสลับถือปืน?</summary>

* ตรวจสอบให้แน่ใจว่าค่า `model-id` ในไฟล์ YAML ตั้งค่าปืน (ในโฟลเดอร์ models/) สะกดตรงกับรหัส Model ID ที่คุณลงทะเบียนไว้ใน BetterModel
* ตรวจสอบว่าตัวแปร `weapon-title` สะกดตรงกับรหัส ID อ้างอิงอาวุธในโฟลเดอร์ปืนของ WeaponMechanics แบบตรงตัวเป๊ะๆ (Case-sensitive)
* ลองพิมพ์คำสั่ง `/bettermodel reload` แล้วตามด้วย `/kba reload` เพื่อล้างแคชประมวลผล

</details>

<details>

<summary>ระบบโชว์โหมดการยิงปืนบน HUD ไม่ถูกต้อง (เช่น ตั้งยิงทีละนัด S แต่ไอคอนขึ้น AUTO)?</summary>

* ปลั๊กอินจะดึงข้อมูลโหมดการยิงจากค่า NBT tag บนตัวปืนในขณะนั้นก่อน หากไม่มีจะดึงจากโครงสร้าง Selective\_Fire ใน WeaponMechanics ปัญหานี้เกิดจากปืนในมือไม่มี NBT เก็บค่า หรือการตั้งค่า Selective\_Fire ใน WeaponMechanics กำหนดไว้ไม่ถูกต้อง

</details>

<details>

<summary>โมเดลปืนค้างอยู่บนหน้าจอระยะหนึ่งหลังสลับเปลี่ยนช่องถือของอื่น?</summary>

* หากปืนกระบอกนั้นมีแอนิเมชัน `unequip` เขียนอยู่ในตั้งค่า ระบบจะหน่วงเวลาสลับของไว้ 10 ticks (0.5 วินาที) เพื่อรอให้เล่นท่าเก็บปืนลงล่างเสร็จก่อน ถ้าคุณไม่ต้องการให้เกิดการหน่วงเวลาและต้องการให้ปืนหายวับไปทันทีเมื่อสลับช่อง ให้ลบข้อความหัวข้อ `unequip` ออกจากไฟล์ตั้งค่าอาวุธ YML

</details>

<details>

<summary>ทำไมขณะแต่งปืน พอโดนศัตรูตีหรือตาย ระบบจะยกเลิกการแต่งทันที?</summary>

* เพื่อความสมดุล ป้องกันไม่ให้ผู้เล่นกดยืนแต่งปืนฟื้นพลังหรือแต่งปืนเอาตัวรอดขณะต่อสู้ ปลั๊กอินมีระบบดักจับอีเวนต์ความเสียหายและการตาย หากเกิดขึ้นระหว่างแต่ง ระบบจะปลดการล็อกหน้าจอ คืนสถานะการเคลื่อนที่ และสั่งปิดหน้าต่างแต่งปืนทันที

</details>

<details>

<summary>เซิร์ฟเวอร์จะแล็กไหมถ้ารองรับคนเล่นจำนวนมากๆ?</summary>

* ระบบเรนเดอร์ใช้กลไกการส่งแพ็คเก็ตจำลองเอนทิตีเฉพาะตัวบุคคล โดยตั้งระยะการมองเห็นใกล้มากเพียง `0.0125f` (มีเพียงผู้เล่นที่ถือปืนเท่านั้นที่จะได้รับการประมวลผลวาดโครงกระดูก) ทำให้เซิร์ฟเวอร์สามารถรองรับผู้เล่นได้มากกว่า 500+ คนพร้อมกันโดยไม่ส่งผลกระทบต่อค่า TPS

</details>
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kbanimation.gitbook.io/kbanimation/q-and-a.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
