> For the complete documentation index, see [llms.txt](https://giant-1.gitbook.io/neef-design/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://giant-1.gitbook.io/neef-design/giant_medicreport/install.md).

# คู่มือการติดตั้ง

## คู่มือการติดตั้ง

ให้ดาวโหลดน์ไฟล์ Script ใน ห้อง #medicreport customer จะสามารถโหลดได้ถ้ามียศ

### 1.เตรียมไฟล์ที่ใช้ในการติดตั้ง Giant\_Medicreport

### 2.ติดตั้ง Giant\_Medicreport

> เปิด server.cfg

```editorconfig
ensure Giant_Medicreport
```

### 3.เชื่อมกับระบบแจ้งเตือนหมอ ที่ esx\_ambulancejob&#x20;

> เข้าไปที่ Client /  main.lua \
> ค้นหาคำว่า Alertnet&#x20;
>
> <pre class="language-lua"><code class="lang-lua"><strong>-- TriggerEvent("Porpy_ambulancealert:alertNet", "dead")
> </strong>-- เพิ่ม function เชื่อมนี้เข้าที่หลัง alertnet ตามภาพตัวอย่าง 
> pcall(function()
>         exports.Giant_Medicreport:SendAlertUI()
> end)
> </code></pre>

{% hint style="danger" %}
ถ้าหากไม่มี alertnet  ให้ค้นหาคำดังนี้ และเพิ่มเข้าไปใน function&#x20;

<pre class="language-lua"><code class="lang-lua">SendDistressSignal()
<strong>pcall(function()
</strong>        exports.Giant_Medicreport:SendAlertUI()
end)
</code></pre>

{% endhint %}

เป็นอันเสร็จสิ้นขั้นตอนการเชื่อมและติดตั้งระบบ

### ตัวอย่างการเชื่อมให้ขึ้นเคส ห่อศพ&#x20;

ให้มีการส่ง status การห่อศพ มาจาก สคลิปห่อศพนั้นๆ เช่น สคลิปห่อศพ ส่งเวลามาอัพเดทที่ esx\_ambulancejob\
สามารถที่จะเขียน event ดักอัพเดท สถานะการโดนห่อศพได้ เช่น การเชื่อมกับ bu\_bodywarp

<pre class="language-lua"><code class="lang-lua">	bodywarp = false
	RegisterNetEvent('Bu_Bodybag-BPK:SETTIME')
		AddEventHandler('Bu_Bodybag-BPK:SETTIME', function(TIME)
			if IsDead then
				bodywarp = true
				earlySpawnTimer = TIME
				totaltimes = earlySpawnTimer
			end
	end)

-------------------------------------------------------

<strong>	-- ดัก event กรณีผู้เล่นตายอีกรอบให้ มันเช็คกลับไปเป็น false
</strong>	AddEventHandler('esx:onPlayerDeath', function(data)
		bodywarp = false
	end)

--------------------------------------------------------

-- event ที่เชื่อมกด G เรียกเคสให้อัพเดทตามนี้
	if bodywarp then 
	-- ถ้าถูกห่ออยู่ให้แจ้งเตือนเคส ห่อ
		pcall(function()
		        exports.Giant_Medicreport:SendAlertUI('bodywarp')
		end)
	else
	--เคสปกติ
		pcall(function()
		        exports.Giant_Medicreport:SendAlertUI()
		end)
	end


</code></pre>
