# ic\_lib

### What is ic\_lib?

**ic\_lib** is a simple FiveM library that provides unified functions for our scripts to work across different server frameworks without modifications.

### Why ic\_lib?

Instead of writing separate versions of scripts for QB-Core, ESX, or standalone servers, ic\_lib automatically detects your setup and handles the differences for you.

```lua
-- Same code works everywhere
Framework.GetPlayer(source)           -- Works on QB-Core, ESX, Standalone
Inventory.AddItem(source, "water", 1) -- Works with any inventory system
Framework.ShowNotification(source, "Hello!")  -- Universal notifications
```

### What it does

* **Auto-detects** your framework (QB-Core, ESX, or Standalone)
* **Auto-detects** your inventory system (qb-inventory, ox\_inventory, etc.)
* **Auto-detects** your target system (qb-target, ox\_target)
* **Provides** unified functions that work the same everywhere
* **Handles** framework-specific differences automatically

### Quick Example

```lua
-- Check if player has money and buy an item
if Framework.RemoveMoney(source, 50, 'cash') then
    Inventory.AddItem(source, 'sandwich', 1)
    Framework.ShowNotification(source, 'You bought a sandwich!', 'success')
end
```

***

Ready to get started? Let's set up ic\_lib on your server.
