π₯ 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¶
- Extract the downloaded ZIP file.
- 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¶
- Join the server.
- Down your character.
- Use the configured AI Medic command.
- 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¶
- Stop the resource.
- Replace the old files with the new version.
- Keep your existing
config.luaif applicable. - Restart the resource.
π¬ Need Help?¶
If you need assistance with installation or configuration, join our Discord server:
Discord
Documentation:
π 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.