> For the complete documentation index, see [llms.txt](https://shift-studios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shift-studios.gitbook.io/docs/new/editor-4.md). Agents can also search and read this documentation through its [MCP server](https://shift-studios.gitbook.io/docs/~gitbook/mcp).

# AI EMS

Transform Your Server With Shift Studios — Powerful, Optimized, And Reliable Resources Built To Improve Every Experience.

<figure><img src="https://4062160621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fgqh3gjuJzDAWNXTD9sEE%2Fuploads%2FQJcZ01ZxLSxyy7LLlO3i%2F350678e5-99f0-4383-8831-084b546a8c7e.png?alt=media&amp;token=44cefc63-88e5-4d97-a3cf-3456c6041fa2" alt=""><figcaption></figcaption></figure>

### Installation

{% stepper %}
{% step %}

### AI EMS

Read Everything Below To Install
{% endstep %}

{% step %}

### Drag & Drop

Drag & Drop The Resource Into Your FiveM Server
{% endstep %}

{% step %}

### Ensure The Resource

Make Sure To Ensure shift-aimedic In Your Server CFG.
{% endstep %}

{% step %}

### Configure Resource

Make Sure To Configure The Resource To Your Liking

{% code expandable="true" %}

```lua
-- ⚫ ███████╗██╗  ██╗██╗███████╗████████╗    ███████╗████████╗██╗   ██╗██████╗ ██╗ ██████╗ ███████╗ ⚫
-- ⬛ ██╔════╝██║  ██║██║██╔════╝╚══██╔══╝    ██╔════╝╚══██╔══╝██║   ██║██╔══██╗██║██╔═══██╗██╔════╝ ⬛
-- ⚫ ███████╗███████║██║█████╗     ██║       ███████╗   ██║   ██║   ██║██║  ██║██║██║   ██║███████╗ ⚫
-- ⬛ ╚════██║██╔══██║██║██╔══╝     ██║       ╚════██║   ██║   ██║   ██║██║  ██║██║██║   ██║╚════██║ ⬛
-- ⚫ ███████║██║  ██║██║██║        ██║       ███████║   ██║   ╚██████╔╝██████╔╝██║╚██████╔╝███████║ ⚫
-- ⬛ ╚══════╝╚═╝  ╚═╝╚═╝╚═╝        ╚═╝       ╚══════╝   ╚═╝    ╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚══════╝ ⬛

Config = {}

Config.Debug = false

-- auto / esx / qb / qbox / standalone
Config.Framework = 'auto'

Config.Commands = {
    Call = 'callems',
    Cancel = 'cancelemscall'
}

Config.Interface = {
    ResourceLabel = 'Shift AI Medic',
    DefaultTheme = 'dark', -- dark / light
    RememberTheme = true,
    DefaultSide = 'right', -- right / left
    RememberSide = true
}

Config.Blip = {
    Enabled = true,
    Track = 'medic', -- medic / ambulance
    Sprite = 153,
    Color = 3,
    Scale = 0.85,
    Alpha = 255,
    Label = 'AI Medic',
    ShortRange = false,
    Route = true,
    RouteColor = 3
}

-- auto / ox_lib / qbox / qb / esx / okok / wasabi / custom / none
Config.Notification = {
    System = 'auto',
    Duration = 5000,
    Position = 'center-left'
}

Config.Price = {
    Amount = 2500,
    AllowCash = true,
    AllowBank = true,
    StandaloneFreeTreatment = true
}

Config.Models = {
    Ambulance = `ambulance`,
    Medic = `s_m_m_paramedic_01`
}

Config.AI = {
    SpawnDistances = { 110.0, 140.0, 180.0 },
    SearchAngles = { 0, 45, 90, 135, 180 },
    ArrivalDistance = 24.0,
    StopDistance = 12.0,
    WalkToPlayerDistance = 2.25,
    DriveSpeed = 20.0,
    DriveStyle = 786603,
    DeleteDelay = 12000,
    FailSafeTimeout = 180000,
    ApproachTimeout = 45000
}

Config.Progress = {
    Duration = 15000,
    AllowCancel = true,
    RefundOnCancel = true,
    DisableMovement = true,
    DisableCombat = true
}

Config.Security = {
    SessionTimeout = 300000,
    RequestTimeout = 10000,
    ReviveTolerance = 1250,
    CallCooldown = 5000
}

Config.Revive = {
    -- auto / fallback / preset / custom_event / custom_export
    Mode = 'auto',
    Preset = 'auto',
    FallbackHealth = 150,
    FallbackOnFailure = true,
    WasabiRetryOnDead = true,
    WasabiVerifyDelay = 900,
    Custom = {
        EventType = 'client', -- client / server
        EventName = '',
        ExportSide = 'server', -- client / server
        ExportResource = '',
        ExportName = ''
    },
    Presets = {
        qbx_medical = {
            type = 'server_export',
            resource = 'qbx_medical',
            export = 'Revive'
        },
        -- Wasabi Ambulance V2. The resource must be named wasabi_ambulance_v2.
        wasabi_ambulance_v2 = {
            type = 'server_export',
            resource = 'wasabi_ambulance_v2',
            export = 'RevivePlayer'
        },
        -- Wasabi Ambulance V1 / legacy resource.
        wasabi_ambulance_v1 = {
            type = 'server_export',
            resource = 'wasabi_ambulance',
            export = 'RevivePlayer'
        },
        -- Backwards-compatible V1 preset name.
        wasabi_ambulance = {
            type = 'server_export',
            resource = 'wasabi_ambulance',
            export = 'RevivePlayer'
        },
        esx_ambulancejob = {
            type = 'client_event',
            event = 'esx_ambulancejob:revive'
        },
        qb_ambulancejob = {
            type = 'client_event',
            event = 'hospital:client:Revive'
        },
        ak47_ambulancejob = {
            type = 'client_event',
            event = 'ak47_ambulancejob:revive'
        }
    }
}

Config.Crutch = {
    Enabled = true,
    Mode = 'preset', -- none / preset / custom_event / custom_export
    Preset = 'wasabi_crutch',
    TimeMinutes = 2,
    Custom = {
        EventType = 'client', -- client / server
        EventName = '',
        ExportResource = '',
        ExportName = ''
    },
    Presets = {
        wasabi_crutch = {
            type = 'client_export',
            resource = 'wasabi_crutch',
            export = 'SetCrutchTime'
        },
        ak47_crutch = {
            type = 'client_event',
            event = 'ak47_crutch:useCrutch'
        }
    }
}

Config.RestrictedZones = {
    -- Example:
    -- { coords = vec3(441.9, -981.9, 30.7), radius = 125.0, label = 'Mission Row Police Department' }
}

Config.Strings = {
    notificationTitle = 'AI Medic',
    alreadyCalled = 'AI Medic Is Already On The Way.',
    notDead = 'You Need To Be Dead To Use AI Medic.',
    emsDispatched = 'Paramedics Are On The Way.',
    emsCancelled = 'AI Medic Call Cancelled.',
    emsFailed = 'AI Medic Could Not Reach You.',
    emsRestricted = 'AI Medic Will Not Enter This Area.',
    emsNearby = 'The Paramedic Has Arrived.',
    emsDeclined = 'You Declined The Medical Treatment.',
    notEnoughCash = 'You Do Not Have Enough Cash.',
    notEnoughBank = 'You Do Not Have Enough Money In Your Bank.',
    paymentSuccess = 'Treatment Paid. Stay Still.',
    paymentFailed = 'Payment Failed.',
    treatmentStarted = 'The Paramedic Is Treating You.',
    treatmentCancelled = 'Treatment Cancelled.',
    treatmentRefunded = 'Treatment Cancelled And Your Payment Was Refunded.',
    reviveDone = 'You Were Successfully Treated.',
    reviveFailed = 'Treatment Finished, But You Could Not Be Revived.',
    noActiveCall = 'You Do Not Have An Active AI Medic Call.',
    cancelTooLate = 'Treatment Has Already Started.',
    modelLoadFailed = 'Failed To Load AI Medic Models.',
    ambulanceCreateFailed = 'Failed To Create AI Ambulance.',
    medicCreateFailed = 'Failed To Create AI Paramedic.',
    invalidPayment = 'Invalid Payment Method.',
    cashDisabled = 'Cash Payments Are Disabled.',
    bankDisabled = 'Bank Payments Are Disabled.',
    playerMissing = 'Player Could Not Be Found.',
    requestTimeout = 'The Server Did Not Respond In Time.',

    billEyebrow = 'Shift AI Medic',
    billTitle = 'Medical Treatment',
    billLabel = 'Medical Treatment',
    billDescription = 'Choose A Payment Method To Begin Treatment',
    treatmentFee = 'Treatment Cost',
    paymentMethod = 'Payment Method',
    cashTitle = 'Cash',
    cashDescription = 'Pay Using Cash On Hand',
    bankTitle = 'Bank Account',
    bankDescription = 'Pay Using Your Bank Balance',
    declineTreatment = 'Decline Treatment',
    pay = 'Pay',

    progressTitle = 'Treating Patient',
    progressDescription = 'Providing Treatment',
    cancelTreatment = 'Cancel',
    seconds = 'Seconds',
    secondsRemaining = 'Seconds Remaining'
}

```

{% endcode %}
{% endstep %}

{% step %}

### Restart / Start Your Server

Ensure Everything Is Working Well & Enjoy !!
{% endstep %}
{% endstepper %}
