OpsLab Books
Realplay Scripts /RPS AI Medic Installation Guide
Help Sign in Sign up
Installation

πŸ“₯ Installation Guide

Follow these steps to install RPS AI Medic on your FiveM server.


πŸ“‹ Requirements

Before installing, ensure you have:

  • βœ”οΈ FXServer Artifact (Latest Recommended)
  • βœ”οΈ RPS Lib
  • βœ”οΈ One of the supported frameworks:
  • QBX
  • QBCore
  • ESX

πŸ“‚ Step 1 β€” Upload the Resource

  1. Extract the downloaded ZIP file.
  2. Upload the folder:
rps_aimedic

to your server's resources directory.

Example:

resources/
└── [rps]
    └── rps_aimedic

πŸ“„ Step 2 β€” Add to server.cfg

Add the following line after your framework and RPS Lib.

ensure rps_lib
ensure rps_aimedic

Example:

ensure ox_lib
ensure qbx_core
ensure rps_lib
ensure rps_aimedic

βš™οΈ Step 3 β€” Configure the Script

Open:

rps_aimedic/config.lua

Configure the settings to match your server.

Examples include:

  • EMS Job Name
  • Maximum EMS Online
  • Treatment Price
  • Cooldown
  • Command Name
  • Medic Models
  • Walking Speed
  • Discord Webhook
  • Restricted Zones
  • Revive Events

πŸš‘ Step 4 β€” Configure the Ambulance System

Choose the revive event that matches your server.

Example:

Config.ReviveEvent = "hospital:client:Revive"

or

Config.ReviveEvent = "esx_ambulancejob:revive"

If your ambulance script uses another event, simply replace it in the configuration.


πŸ’° Step 5 β€” Configure Payments

Choose how players should pay for treatment.

Example:

Config.Price = 2500

Optional:

  • Cash
  • Bank
  • Society Account

🚨 Step 6 β€” Configure EMS Restrictions

Prevent AI Medic from being used while EMS are online.

Example:

Config.MaxEMS = 2

If more than 2 EMS are on duty, players must wait for real medical assistance.


πŸ“ Step 7 β€” Configure Restricted Zones (Optional)

Prevent AI Medic from being used in specific locations.

Example:

Config.RestrictedZones = {
    vector3(450.0, -980.0, 30.0)
}

πŸ“’ Step 8 β€” Discord Logging (Optional)

Enable Discord logs by adding your webhook.

Example:

Config.DiscordWebhook = "YOUR_WEBHOOK_URL"

Logs can include:

  • AI Medic Requested
  • Player Revived
  • Payment Processed
  • Failed Requests
  • Cooldowns Triggered

▢️ Step 9 β€” Restart the Resource

Either restart the resource:

restart rps_aimedic

or restart your server.


βœ… Step 10 β€” Test the Script

  1. Join the server.
  2. Down your character.
  3. Use the configured AI Medic command.
  4. Verify: - Payment is taken - AI Medic spawns - Medic walks to the player - Treatment animation plays - Countdown appears - Player is revived - Cooldown is applied - Discord logs are sent (if enabled)

πŸ”§ Troubleshooting

AI Medic does not spawn

Check:

  • Resource is started
  • RPS Lib is running
  • Framework is loaded before RPS AI Medic

Player is not revived

Verify:

  • Correct revive event
  • Ambulance resource is running
  • Framework bridge is configured correctly

Payment does not work

Verify:

  • Money type is configured correctly
  • Banking resource is running
  • Player has sufficient funds

Command does nothing

Check:

  • Command name in config.lua
  • Resource started successfully
  • No script errors in the server console

Discord logs do not appear

Verify:

  • Webhook URL is valid
  • Internet access is available
  • Discord webhook has not been deleted

πŸ”„ Updating

  1. Stop the resource.
  2. Replace the old files with the new version.
  3. Keep your existing config.lua if applicable.
  4. Restart the resource.

πŸ’¬ Need Help?

If you need assistance with installation or configuration, join our Discord server:

Discord

https://discord.gg/realplayscripts

Documentation:

https://docs.realplayscripts.co.za


πŸŽ‰ You're Ready!

Once installed, your players can request an AI Medic whenever emergency medical services are unavailable, providing a smooth and immersive gameplay experience.