[ESX] MSK AI Medic

MSK AI Medic

Simple AI Medic NPC that try to revive you

Github Download

Description

  • When you are dead and no Medic is Online then you can press the hotkey
  • An NPC will then come to you with a vehicle and try to revive you
  • You can set a chance whether the NPC manages to revive you or not
  • You can set whether the NPC tries again after a failed attempt or leaves afterwards.
  • Fee for reviving
  • Discord Logs
  • Support for visn_are

Config

Config = {}
----------------------------------------------------------------
Config.Locale = 'de'
Config.VersionChecker = true
----------------------------------------------------------------
-- Add the Webhook Link in server.lua
Config.DiscordLog = true
Config.botColor = "6205745" -- https://www.mathsisfun.com/hexadecimal-decimal-colors.html
Config.botName = "MSK Scripts"
Config.botAvatar = "https://i.imgur.com/PizJGsh.png"
----------------------------------------------------------------
Config.Hotkey = {key = 38, label = 'E'}
Config.SpawnRadius = 150 -- default: 150 meters
Config.DrivingStyle = 786475 -- default: 786475 // https://vespura.com/fivem/drivingstyle/
----------------------------------------------------------------
Config.RevivePrice = 5000 -- Price to get revived
Config.ReviveDuration = 10 -- in seconds // default: 10 seconds

Config.ReviveChance = {
    enable = true, -- Set false that you always get revived
    chance = 50, -- Percent to get revived

    tryagain = false, -- Set to true if the NPC should try it again if he failed
    howOften = 3, -- If NPC failed to revive the player then he tries up to 3 times more
}
----------------------------------------------------------------
Config.VisnAre = GetResourceState("visn_are") ~= "missing"
----------------------------------------------------------------
Config.Jobs = {
    amount = 0, 
    jobs = {
        'ambulance',
        'fire_department',
    }
}
----------------------------------------------------------------
Config.Medic = {
    npcName = 'Doc. Holiday', 
    pedmodel = 's_m_m_doctor_01', 
    vehmodel = 'ambulance',
}
----------------------------------------------------------------
Config.ProgressBar = function()
    exports.msk_core:ProgressStart(10000, 'Du wirst nun wiederbelebt...')
end

Config.ReviveTrigger = function()
    if Config.VisnAre then
        TriggerEvent('visn_are:resetHealthBuffer')
    else
        TriggerEvent('esx_ambulancejob:revive')
    end
end

Requirements

My other Scripts

Paid

Free

4 Likes

Update v1.2

  • Fixed OnlineMedics not updating
  • Added Fee for revive
  • Added Discord Webhook
2 Likes

When the medic revives me he doesnt take the money, i do have a fee active, and sometimes the prompt to press E to call him stays on the screen even after he revives you. Otherwise I love the script, been waiting a year for this.

1 Like

I’ll try to fix the bugs

1 Like

Thanks, You’re the best!!

When i use the script the medic drives circles around me and doesn’t revive me

Update v1.3

  • Added Support for visn_are

It works without problems on ESX