# Free Air Hockey

[📥 **Download it for free!**](https://store.sergioverse.com/package/airhockey)

### 📸 **Preview**

<div><figure><img src="/files/235XqsfEGrVXYncwZCv3" alt=""><figcaption></figcaption></figure> <figure><img src="/files/qIRjluiBcWsKQc2jqjIt" alt=""><figcaption></figcaption></figure></div>

***

### 📦 **Features**

✅ Fully synced **multiplayer gameplay** (requires OneSync)\
✅ **Professional 3D table model** replacing the original GTA V prop\
✅ **Solo and 1v1 mode** — play alone or against another player\
✅ **Mouse-based movement & controls**\
✅ **Dynamic 3D scoreboard** rendered on the table itself\
✅ **Configurable match time and score limit** (default: 3 min / 7 points)\
✅ **Smooth synchronized animations and physics**\
✅ **All major FiveM languages included** (20+ locales: English, Spanish, French, German, Portuguese, Arabic, and more)\
✅ **Optimized and lightweight** – ideal for roleplay servers\
✅ **Standalone**, works with any framework

***

### ⚙️ **Installation**

#### **1️⃣ Dependencies**

Required:

* **OneSync** (essential for multiplayer sync)

***

#### **2️⃣ AirHockey Pro Resources**

Download and install:

```
sverse_airhockey
sverse_airhockey_assets
```

Place them inside your server’s `resources` folder.

***

#### **3️⃣ Add to `server.cfg`**

```
ensure sverse_airhockey
ensure sverse_airhockey_assets
```

***

#### **4️⃣ Table Integration**

AirHockey **automatically replaces** all air hockey tables across the map with the new professional model.\
You can also:

* Add tables manually through `Config.lua`
* Place them dynamically with a **mapping tool**
* Spawn them through **housing or arcade systems**

No setup required, every table becomes instantly playable.

***

#### **5️⃣ Controls**

* **Mouse movement** → Move the paddle
* **Score limit** → Default 7 (configurable)
* **Time limit** → Default 3 minutes (configurable)
* **Exit game** → Press *Backspace* or *ESC* (configurable)

***

#### **6️⃣ Multiplayer System**

Players can walk up to any air hockey table and interact.\
If no one joins, you can play **solo mode** for practice or fun.

All animations, puck physics, collisions, and scores are **fully synchronized** between nearby players.

***

### 🎮 **How to Play**

1️⃣ Approach any air hockey table.\
2️⃣ Interact using the E key (or the one you put).\
3️⃣ If you’re alone, the game starts in **solo mode**.\
4️⃣ If another player joins, it becomes a **1v1 match**.\
5️⃣ Move your paddle using the **mouse** to hit the puck and score goals.\
6️⃣ The game will stop if both players leave or if 7 rounds (or the pucks you put) are over or there is no **time left.**

The scoreboard is **3D-rendered** on the table and visible for all nearby players in real time, no intrusive UI.

***

### 🧠 **Configuration**

All settings are handled inside `Config.lua`.

#### **⚙️ Basic Settings**

```lua
Config.locale = 'en' -- en, es, pt, fr, de, ar, etc.
```

#### 🏒 **Tables**

```lua
-- Tables setup (position is center of table, heading is direction of the table)
Config.tables = {
    {
        position = vector3(-1635.243896, -1053.903320, 13.137695),
        heading = 323.149597
    }
}
```

#### **🕹️ Gameplay**

```lua
Config.defaultGameOptions = {
    totalPucks = 7,      -- integer > 0 and odd number
    whoStarts = 'random',   -- 'red' | 'blue' | 'random'
    timeLimit = 180,    -- seconds, integer > 0
}
```

#### **🧱Visuals**

```lua
Config.playerAlphaWhilePlaying = 50 -- 0-255 alpha value for player while playing
```

#### **⌨️ Controls**

```lua
Config.playControlKey = 38 -- https://docs.fivem.net/docs/game-references/controls/
Config.playControlLabel = "E"

Config.cancelControlKey = 177 -- https://docs.fivem.net/docs/game-references/controls/
```

#### **🌍 Localization**

Includes **20+ pre-installed languages** (English, Spanish, French, German, Portuguese, Arabic, and more).\
You can add or modify translations inside `Locales.lua`.

#### ❓ **Help Notification**

You can edit the 3D help notification editing the file `Bridge.lua`.

***

### ❓ **FAQ**

**Q: Does it replace the GTA V air hockey prop automatically?**\
A: Yes. All props are replaced with the new high-quality model.

**Q: Can I play solo?**\
A: Yes. Solo mode is supported by default.

**Q: How do I exit a game?**\
A: Press *Backspace* or *ESC* (configurable).

**Q: Is it fully synced for all players nearby?**\
A: Yes. Movements, puck, goals, and animations are synced using OneSync.

**Q: Can I change the score limit or match duration?**\
A: Absolutely. Configurable in `Config.lua`.

**Q: Is there a scoreboard UI?**\
A: The scoreboard is drawn directly on the table, visible in 3D for everyone.

**Q: What languages are included?**\
A: Over 20 languages, including English, Spanish, Portuguese, French, German, and Arabic.

**Q: Can I add my own translations?**\
A: Yes, simply edit the `Locales.lua` file.

**Q: Does it support my framework?**\
A: Yes, it supports any framework.


---

# 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://docs.sergioverse.com/free-air-hockey.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.
