[QB/ESX] AI NPC Doctor [FREE]

Description

  • This script is basically for to be used in the server when there are no ems /doctors available in the server the players will get an option to pay and get helped/revived on there spot present by a moving ambulance with a doctor!

Features

  • This script is a very useful for huge servers where the population have no option rather than respawning
    every time they will get to experience more rp by this method!
  • The ems ped in the ambulance can come from anywhere it doesn’t matter where you are located and it
    will be in a well mannered way
  • Money/fees of the ambulance and the ems ped will be deducted for there service!
  • The driving manner of the ped is very well organized it wont drive recklessly!
  • This script is highly configurable according to your choice all of the options you see in the video and
    features are editable with the notifications!
  • This script is basically for enhancing and bringing up more rp in the server rather than respawning!
  • This script supports ESX and QB and if any excessive support needed hit me up!
  • It will automatically adapt to your framework whether ESX/QB basically its a put and run script!
  • This script is uploaded on GitHub so you guys can request pull requests so feel free to add some
    required and useful changes.
  • Feel free to do whatever you like with this script just don’t edit and resell lol!
  • Everything else is in the video have a look on it to get a better understanding of the script and have a idea on how it works!
  • By the way it can be considered a bit standalone as it adapts to the framework!

Commands

  • /help (when dead!)

PREVIEW

DOWNLOAD
[AS WE DONT HAVE A ESX SERVER TO PERFECTLY TEST IT ON SO YOU MIGHT HAVE TO DO SOME TWEAKS YOURSELF TO ADAPT IT TO YOUR SERVER IF IT DOESNT WORK ELSE IT WORKS COMPLETELY FINE FOR MANY PEOPLE! QB IS PERFECTLY TESTED AND WILL SURELY WORK UNTIL YOU MAKE A MAJOR CHANGE TO IT!]

38 Likes

Just what I needed, nice one

1 Like

thanks my problem Using Esx :frowning:

I do not have the file imports.lua I am using “es_extended v1 finnaly”

I do not have the file imports.lua I am using “es_extended v1 finnaly”

fx_version 'adamant'

game 'gta5'

description 'HHFW AI Doc'

version '0.1.0'


client_scripts {
    'config.lua',
    'client.lua',
    '@es_extended/imports.lua'  --Enable this if ur using ESX
    --'@qb-core/import.lua'
}

server_scripts {
    'config.lua',
    'server.lua',
    '@es_extended/imports.lua' --Enable this if ur using ESX
    --'@qb-core/import.lua'
}

2 Likes

thanks for sharing the script.
When you do the / help command it generates this server side error
using es_extended 1.2 legacy

5 Likes

What hud do you use? It’s sick!

1 Like

ADD THESE TWO ABOVE

IN CLIENT SIDE USE THIS

ESX = nil

Citizen.CreateThread(function()
    while ESX == nil do
        TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
        Citizen.Wait(200)
    end
end)

IN SERVER SIDE USE THIS

ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
2 Likes

Hey mate check if you renamed the es_extended?

1 Like

yes you are right too. I had edited on the server side but not the client side.
now I generate this error and after the cooldown of the revive the character does not revive and remains on the ground,
as if it didn’t get the:
TriggerServerEvent (‘esx_ambulancejob: revive’, GetPlayerServerId (PlayerId ()))

1 Like

Now he takes the money. I have money as an item.
But it does not revive the character and does not generate any errors on the client and server side

1 Like

Resuscitation also fixed. Change the :

TriggerServerEvent(‘esx_ambulancejob:revive’, GetPlayerServerId(PlayerId()))

to

TriggerEvent(‘esx_ambulancejob:revive’, GetPlayerServerId(PlayerId()))

now it’s perfect :slight_smile:

3 Likes

glad to hear that !

tysm mate!

4 Likes

image

i have es_extended working and fixed the fxmanifest and deleted the qbcore in that. still not working. im using the old esx 1.1 count/limit version.

1 Like

i think only es extended to have imports.lua is legacy, only version ive seen so far to have it

1 Like

“SCRIPT ERROR: @hh_aidoc/server.lua:71: attempt to call a nil value (global ‘getMoney’)”

server.lua need to be change 71 line (ESX) getMoney() function to xPlayer.getMoney() for working without nil value warning. (ESX Legacy)

1 Like

Nice work, would you also mind sharing your chat resource? Looks clean

1 Like

Fixed mate!

1 Like

Remove the imports.lua from fxmanifest and use the fixed code given above by me.

just ui changes can be done!

Should probably add a ESX folder and a QB folder for each framework + fix the errors :smile:

Anyways, i get; i use ESX–

[ script:hh_aidoc] SCRIPT ERROR: @hh_aidoc/server.lua:71: attempt to call a nil value (global 'getMoney')

After i revive myself, from command i lose all the money also all the items in the inventory. Something is wrong with this script…

Screenshot_21


2 Likes