> For the complete documentation index, see [llms.txt](https://rex-studio.gitbook.io/rex-studio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rex-studio.gitbook.io/rex-studio-docs/fivem-script/emote-ui.md).

# EMOTE UI

<figure><img src="/files/c622LVFdU64RmckTavof" alt=""><figcaption></figcaption></figure>

### ⚡ Important: Full RPemote Compatibility

**Emote is 100% compatible with RPemote's basic emote system.** All standard RPemote commands and emotes work seamlessly with Emote. You can use the same commands (`/e`, `/emote`, `/walk`, etc.) and all RPemote emotes are fully supported. Emote extends RPemote's functionality with additional features like a modern UI, shared emotes, sequences, adjustment system, and much more, while maintaining complete backward compatibility.

### 📋 Description

Emote is a complete and professional animation system for FiveM, offering over **2300+ emotes** organized into different categories. The script features a modern user interface, advanced customization features, and full integration with ESX, QBCore frameworks, or Standalone mode. Built on RPemote's foundation, Emote maintains full compatibility while adding powerful new features.

### ✨ Main Features

#### 🎭 Complete Emote System

* **2300+ Emotes** organized into 10 categories:
  * **Emotes**: General animations
  * **Dances**: Dance animations
  * **Props**: Emotes with objects
  * **Shared**: Synchronized emotes between players
  * **Walks**: Custom walking styles
  * **Gang Signs**: Gang signs
  * **Couple**: Two-person emotes
  * **Expressions**: Facial expressions
  * **+18**: Adult content (optional)
  * **Vehicles**: Motorcycle-specific emotes

### 🎨Modern User Interface

* **Interactive menu** accessible via F3 (configurable)
* **Advanced search** to quickly find an emote
* **Favorites system** with drag-and-drop
* **Full customization**:
  * Interface colors (primary/secondary)
  * Menu position (left/center/right)
  * Predefined colors (red, green, yellow, blue, purple)
* **Quick menu** (F4) to access favorites and sequences

<figure><img src="/files/IGQlrgMaWfFDWYTIlEKc" alt=""><figcaption></figcaption></figure>

### 🌍Multilingual Support

* **3 languages available**: English (en), French (fr), Spanish (es)
* **Locale system** configurable in `shared/_main.lua`
* **Complete translations** of interface and in-game messages
* **Dynamic category translations**

### 🎯Advances Features

<figure><img src="/files/5WNYisfyOfGCiuzJTRR4" alt=""><figcaption></figcaption></figure>

**Sequence System**

* Creation of custom **animation sequences**
* Configurable delay between each emote (max 10 seconds)
* Save and load named sequences
* Quick access via F4 menu
* Management of multiple saved sequences

**Emote Adjustment System**

* **Precise adjustment** of emote positions
* **3D Gizmo** for intuitive manipulation:
  * Translation (W) - Move the emote
  * Rotation (R) - Rotate the emote
  * Local/World mode (Q) - Change reference frame
  * Selection (Left click) - Select axis
  * Validation (Enter) - Confirm position
* **Safety limits** (max distance, max height)
* `/adjust` command or right-click on an emote
* Return to starting position if cancelled

<figure><img src="/files/UjP97MwrqZ1DK11nac8b" alt=""><figcaption></figcaption></figure>

**Clone Ped (Preview)**

* **Real-time visualization** of the emote before playing it
* **Position adjustment** via sliders in settings:
  * Height - Adjust clone height
  * Position X/Y - Move horizontally
  * Rotation - Rotate the clone
* **Parameter saving** in preferences (KVP)
* **Toggle with eye button** in main menu
* **Camera synchronization** for dynamic positioning
* **Adjustable transparency** based on distance

**Shared Emotes**

* **Synchronization system** between players
* **Invitation** via `/nearby [emote]` command
* **Accept/Decline** with E/L keys (10 seconds to respond)
* **Props support** for shared emotes
* **Automatic second clone** for visualization
* **Offset management** for relative positioning
* **Shared dance emotes** support
* **Automatic cleanup** after 5 seconds

**Props System**

* **Automatic management** of objects for emotes
* **Bone attachment** to character
* **Precise placement** with configurable offsets
* **Automatic cleanup** on cancellation
* **Multi-props support** for certain emotes

### 🎮Controles and Commands

**Main Commands**

* `/e [name]` or `/emote [name]` - Play an emote
* `/emotemenu` - Open animation menu
* `/cancelemote` or `/e c` - Cancel current emote
* `/walk [name]` or `/w [name]` - Change walking style
* `/walk reset` - Reset walking style
* `/nearby [name]` - Invite nearby player to shared emote
* `/adjust` - Adjust position of current emote

**Keyboard Shortcuts**

* **F3** - Open animation menu (configurable)
* **F4** - Open quick menu (favorites/sequences)
* **X** - Cancel current emote (if enabled)
* **CapsLock** - Play favorite emote (if set)

**Emote Binds**

* **Integrated bind system** to assign keys
* Standard keyboard and numpad support
* Graphical interface for configuration
* Persistent bind saving

### 🎪 Special Features

**Ragdoll**

* **Activation/Deactivation** via `/ragdoll` command or configured key
* Configurable toggle mode
* Default key: `+`
* Synchronization with other players

**Pointing**

* **Finger pointing** with synchronization
* Disabled while crawling (error message)
* Option to enable/disable in vehicles
* Default key: `B`
* Smooth and realistic animation

**Hands Up**

* **Raise hands** with synchronization
* Available in vehicles (optional)
* Default key: `Y`
* Toggle mode available

**Crouching**

* **Realistic crouching system**
* Configurable FPS mode (disables crouching in 3rd person view)
* Stealth mode disable (optional)
* Default key: `LControl`
* Smooth animation with transitions

**Crawling**

* **Crawling** with smooth animations
* Default key: `RControl`
* Compatible with emote system
* Blocks certain actions while crawling

**Binoculars**

* **Binoculars system** with night vision and thermal vision
* Toggle between vision modes (if enabled)
* `/binoculars` command
* Showable/hideable instructions
* Exit with ESC or command
* Thermal and night vision separately configurable

### 🛠️Framework Integration

**Multi-Framework Support**

* **ESX** - Full support
* **QBCore** - Full support
* **Standalone** - Autonomous mode without framework

**Configuration**

```lua
Config.Core = "ESX" -- "ESX", "QBCore", "Standalone"
Config.CoreExport = function()
    return exports['es_extended']:getSharedObject()
    -- or exports['qb-core']:GetCoreObject()
end
```

#### 📦 Available Exports

**Client-Side**

```lua
-- Get data of currently playing emote
local emoteData = exports['emote']:GetEmote()
-- Returns: { EmoteName = {dict, anim, name}, Name = "emote_name" }

-- Use gizmo to adjust an entity
local gizmoData = exports['emote']:useGizmo(entity, options)
-- Returns: { handle = entity, position = coords, rotation = rotation }
```

**Server-Side**

The script exposes network events for synchronizing emotes between players.

**Network Events**

**Client → Server:**

* `ServerEmoteRequest` - Send shared emote request
* `ServerValidEmote` - Validate accepted shared emote
* `emote:GetLastFromTarget` - Get last emote played by a player
* `emote:GotLastPlayed` - Send last played emote

**Server → Client:**

* `ClientEmoteRequestReceive` - Receive shared emote request
* `SyncPlayEmote` - Synchronize emote with another player
* `SyncPlayEmoteSource` - Synchronize source emote
* `emote:GetLastPlayedForTarget` - Request last played emote
* `emote:PlayOtherPlayerAnim` - Play another player's animation
* `emote:PlayEmoteByName` - Play emote by name
* `emote:deleteClonePed` - Delete clone ped
* `emote:destroyCloneProps` - Destroy clone props

#### ⚙️ Advanced Configuration

**Adjustment Settings**

```lua
Config.maxDistance = 3        -- Maximum distance for adjustment
Config.maxHeight = 1.2         -- Maximum height
Config.rotateSpeed = 5         -- Rotation speed
Config.movementSpeed = 0.05    -- Movement speed
Config.cloneAlpha = 190        -- Clone transparency
```

**General Settings**

```lua
Config.DebugDisplay = false           -- Show debug messages in console
Config.EnableXtoCancel = true         -- Enable X to cancel
Config.DisarmPlayer = false           -- Disarm player when playing emote
Config.AllowedInCars = true           -- Allow emotes in vehicles
Config.letExpressionOverride = true  -- Keep expression after disconnect
```

### 🎨Interface Customization

<figure><img src="/files/IBgcxWz86LZzLt5SVkZK" alt=""><figcaption></figcaption></figure>

**Colors**

* **Custom color**: Free choice of primary/secondary colors
* **Predefined colors**: Red, Green, Yellow, Blue, Purple
* **Default color**: Return to original colors

**Menu Position**

* **Left**: Menu aligned to left
* **Center**: Centered menu
* **Right**: Menu aligned to right (default)

#### 📚 File Structure

```
emote/
├── client/
│   ├── _main.lua          # Main menu management
│   ├── adjust.lua         # Adjustment system
│   ├── binoculars.lua    # Binoculars system
│   ├── cloneped.lua       # Clone ped and preview
│   ├── crouch.lua         # Crouching
│   ├── emote.lua          # Main emote system
│   ├── gizmo.lua          # 3D gizmo for adjustment
│   ├── handsup.lua        # Hands up
│   ├── pointing.lua       # Pointing
│   ├── ragdoll.lua        # Ragdoll
│   ├── raycast.lua        # Raycast system
│   ├── sync.lua           # Synchronization
│   ├── utils.lua          # Utilities
│   └── walk.lua           # Walking styles
├── shared/
│   ├── _main.lua          # Main configuration
│   ├── adjust.lua         # Adjustment config
│   ├── bike.lua           # Motorcycle config
│   ├── emotes.lua         # Emote database (2300+)
│   ├── faq.lua            # FAQ
│   ├── locale.lua         # Locale system
│   ├── notify.lua         # Notification system
│   └── traduction.lua     # Multilingual translations
├── server/
│   └── _main.lua          # Server management
├── ui/
│   ├── index.html         # HTML interface
│   ├── css/               # CSS styles
│   └── js/                # JavaScript scripts
└── stream/                # Props assets
```

### 🚀Installation

1. **Download** the script to your `resources` folder
2. **Configure** the framework in `shared/_main.lua`
3. **Configure** the language in `shared/_main.lua` (Config.Locale)
4. **Add** to `server.cfg`:

   ```
   ensure emote
   ```
5. **Restart** the server

#### 🎨 Animation Options

**Texture Variants**

* **Variant support** for certain emotes
* Allows changing prop appearance
* Management via `PlayEmoteByName` export with textureVariation parameter

**Emote Options**

* **EmoteLoop**: Infinite loop animation
* **EmoteMoving**: Allows movement during animation
* **EmoteDuration**: Specific animation duration (in milliseconds)
* **NoAnimation**: Disables animation (for certain special emotes)
* **Prop**: Object name to use
* **PropBone**: Prop attachment bone
* **PropPlacement**: Prop position and rotation
* **Attachto**: Attach entity to another (for shared emotes)

#### 📝 Important Notes

* The script requires **asset packs** for props
* **Expressions and walking styles** are saved after disconnect (if enabled)
* **Shared emotes** require both players to be close (< 3m)
* **Emote binds** are saved locally
* **Emotes in vehicles** play only upper body part
* The script **automatically disarms** player when playing emote (if enabled)
* **Props are automatically cleaned up** when cancelling emote
* **Clone ped** follows camera in real-time for optimal positioning
* **Emotes with scenarios** use GTA V native scenario system
* **Texture variants** are supported for certain emotes with props
* The system **automatically detects** player gender for certain emotes

#### 🎯 Use Cases

**For Players**

* **Immersive RP**: Over 2300 animations to enrich roleplay
* **Customization**: Fully customizable interface
* **Speed**: Quick access via favorites and binds
* **Sharing**: Synchronized emotes with other players

**For Developers**

* **Exports**: Complete API for integration
* **Events**: Event system for synchronization
* **Configuration**: Extensible parameters
* **Modular architecture**: Organized and maintainable code

#### 🔒 Security and Performance

* **Server validation**: Shared emote verification
* **Distance limits**: Protection against abuse (3m for shared emotes)
* **Automatic cleanup**: Props and entity removal
* **Error handling**: Robust handling of edge cases
* **Memory optimization**: Emotes loaded in batches (50 per batch)
* **Timeout management**: 10 second timeout for shared emote invitations
* **Spam protection**: Validation system to prevent abuse
* **Scenario cleanup**: Automatic removal of scenario objects
