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

# Installation Guide

The installation process for STALK Medic has been designed to be quick and easy to set up on your server.\
The resource is fully configurable and already includes everything required for a complete immersive medical and death system experience.

No complicated setup is required, and most of the customization can be done directly through the `config.lua` file.

***

## Step 1 : Resource Installation

Start by dragging the `stalk_medic` folder into your server’s `resources` directory.

Once the resource has been added, open your `server.cfg` file and add the following line:

```
ensure stalk_medic
```

After saving the changes, restart your server.

***

## Step 2 : Required Dependencies

Before starting the resource, make sure the following dependencies are correctly installed on your server:

* `es_extended`
* `ox_inventory`
* `oxmysql`
* `PolyZone`

The script relies on these resources for:

* player management,
* database interactions,
* inventory handling,
* and medical zone detection.

Without these dependencies, the resource will not function correctly.

***

## Step 3 : Main Script Configuration

All major configuration settings are located inside:

```
stalk_medic/shared/config.lua
```

From this file, you can customize:

* death timers,
* treatment prices,
* hospital cooldowns,
* NPC models,
* interaction keys,
* medic behavior,
* animations,
* notifications,
* and all hospital zones.

The default configuration already includes a fully working setup.

***

## Step 4 : Medical System Configuration

The script includes two different medical systems:

* hospital treatment,
* and emergency medic assistance while dead.

You can customize the treatment prices directly inside the configuration:

```
Config.HospitalHealPrice = 50Config.DeathMedicPrice = 75
```

You can also modify the treatment duration:

```
Config.TreatmentDurationSeconds = 10
```

This controls how long the healing animation and treatment process lasts.

***

## Step 5 : Death System Configuration

The script includes a complete death screen and unconscious system.

The default death timer is configured here:

```
Config.DeathTimerSeconds = 390
```

During this time, players can:

* wait for a medic,
* request emergency treatment,
* or respawn depending on your configuration.

The system also includes:

* voice mute while dead,
* protected death states,
* control disabling,
* and anti-abuse protections.

***

## Step 6 : Hospital Zones Configuration

The entire hospital system is based on configurable medical zones using `PolyZone`.

Example:

```
Config.Zones = {    {        id = 'hospital_lossantos',        label 'Los Santos Hospital',        center = vector3(4565.0, -4883.0, 21.5),        radius = 500.0,    }}
```

Each zone can contain:

* treatment interaction points,
* beds,
* medic NPCs,
* cameras,
* exits,
* and respawn locations.

You can create as many medical zones as you want by duplicating an existing zone configuration.

***

## Step 7 : NPC Configuration

The script uses multiple NPCs for:

* reception doctors,
* treatment medics,
* and death medics.

Default models are configured here:

```
Config.Models = {    ReceptionDoctor = 's_m_m_doctor_01',    TreatmentDoctor = 's_m_m_paramedic_01',    DeathMedic = 's_m_m_paramedic_01'}
```

You can freely replace these models with any GTA V ped model.

The script also automatically protects NPCs against:

* damage,
* ragdoll,
* despawning,
* and unwanted player interactions.

***

## Step 8 : Interaction Keys

All interaction keys are configurable inside the config file.

Default controls:

```
Config.Keys = {    Interact = 38,    CallMedic = 45,    Respawn = 73}
```

By default:

* `E` is used for interactions,
* `R` is used to call a medic,
* `X` is used for respawn actions.

You can fully customize these keybinds depending on your server setup.

***

## Step 9 : Medic Availability & Cooldowns

The script includes:

* automatic medic cooldowns,
* unavailable schedules,
* no-show chances,
* and busy medic handling.

Example:

```
Config.HospitalCareCooldownSeconds = 1200Config.DeathMedicNoShowChance = 6
```

This prevents players from abusing the medical system while keeping the gameplay immersive.

The cooldown data is automatically saved using the database table:

```
Config.CooldownTable = 'stalk_medic_cooldowns'
```

***

## Step 10 : Notifications & Localization

All notifications can be customized directly inside the configuration file.

Example:

```
Config.Notifications = {    NoMoney = 'You dont have enough money.',    MedicComing = 'A medic is on their way.'}
```

You can translate or rewrite every notification to perfectly match your server style and language.

***

## Step 11 : Admin Features

The script also includes administrator commands and protections.

Administrators can:

* revive players,
* kill players,
* bypass restrictions,
* and manage emergency situations.

Authorized licenses can be configured here:

```
Config.AdminLicenses = {    ''}
```

***

## Important

Before updating the resource or modifying important settings, we strongly recommend creating a complete backup of your server and database.

Even though the script is optimized and tested before release, backups remain essential to avoid issues caused by incorrect configurations or external conflicts.

***

## AI / Documentation Queries

If some information is not directly available on this page, you can dynamically query the documentation using the `ask` parameter.

Example:

```
GET https://docs.stalk.dev/stalk-medic/installation-guide.md?ask=<your-question>
```

You can ask questions such as:

* how to add a new hospital,
* how to modify medic cooldowns,
* how to change NPC positions,
* how to customize the death system,
* or how to configure treatment zones.

The system will automatically return a direct answer along with the most relevant documentation sections.
