# Welcome

## ⭐ [github.com/ABUGIZA/COREX-Framework](https://github.com/ABUGIZA/COREX-Framework)

> **Framework source code** — clone, star, open issues, send PRs.

***

## COREX Framework

A modern, StateBag-first FiveM framework purpose-built for Zombie Survival servers.

<div align="center"><img src="https://i.ibb.co/390Ky8hD/bced4236759c35ba6ea6e73218a37b97.png" alt="COREX" width="140"></div>

***

### Why COREX

{% hint style="success" %}
**Simple Tables over OOP** — Predictable Lua, zero metatable magic. `player.money.cash` just works.
{% endhint %}

{% hint style="info" %}
**StateBag-first sync** — Framework data replicates automatically. No `TriggerClientEvent` spam, no late-join desync.
{% endhint %}

{% hint style="warning" %}
**Metadata-centric persistence** — `SetMetaData` / `GetMetaData` for anything: skin, hunger, last position, custom state — all auto-saved.
{% endhint %}

***

### Get started in 60 seconds

```cfg
# server.cfg
ensure oxmysql
ensure corex-core
ensure corex-inventory
ensure corex-spawn
```

```lua
-- your first resource: server.lua
local Corex = exports['corex-core']:GetCoreObject()

AddEventHandler('corex:server:playerReady', function(source, player)
    Corex.Functions.AddMoney(source, 'cash', 500)
    print(('Welcome %s — starter cash issued.'):format(player.name))
end)
```

[Full installation guide →](https://github.com/ABUGIZA/corex-docs/blob/main/content/getting-started/installation.md)

***

### 14 production-ready resources

| Domain         | Resources                                                                                            |
| -------------- | ---------------------------------------------------------------------------------------------------- |
| **Foundation** | `corex-core`                                                                                         |
| **Player**     | `corex-spawn` · `corex-death` · `corex-hud` · `corex-survival`                                       |
| **World**      | `corex-zombies` · `corex-events` · `corex-weather` · `corex-zones` · `corex-redzones` · `corex-loot` |
| **Systems**    | `corex-inventory` · `corex-crafting` · `corex-notify`                                                |

[Browse all resources →](https://github.com/ABUGIZA/corex-docs/blob/main/content/resources/README.md)

***

### What makes it different

Every popular FiveM framework hides its architecture. COREX documents the **why** behind every design choice — from why we use StateBag over events, to why the Player is a plain table instead of an object.

[Architecture deep dive →](https://github.com/ABUGIZA/corex-docs/blob/main/content/architecture/README.md)

***

### Quick links

* [Installation](https://github.com/ABUGIZA/corex-docs/blob/main/content/getting-started/installation.md) — get your server running
* [Your first resource](https://github.com/ABUGIZA/corex-docs/blob/main/content/getting-started/first-resource.md) — 5-minute tutorial
* [API Reference](https://github.com/ABUGIZA/corex-docs/blob/main/content/api-reference/README.md) — every export, every event
* [Guides](https://github.com/ABUGIZA/corex-docs/blob/main/content/guides/README.md) — cookbook-style recipes

### Repositories

* **Framework code:** [github.com/ABUGIZA/COREX-Framework](https://github.com/ABUGIZA/COREX-Framework)
* **Docs source (this site):** [github.com/ABUGIZA/corex-docs](https://github.com/ABUGIZA/corex-docs)

***

<sub>Built by</sub> [<sub>ABUGIZA</sub>](mailto:mhmdsweeyd@gmail.com) <sub>· Open for community contributions</sub>


---

# Agent Instructions: 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:

```
GET https://corex-zombies.gitbook.io/corex-docs/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
