Comment on page
Installation
Note: This script can be used with any framework since it has no dependencies.
- 1.
- 2.Extract the
visn_are.pack.zip
-archive into yourresources
folder. - 3.Rename
visn_are.pack
tovisn_are
. - 4.Open the
configuration
folder inside thevisn_are
-folder. - 5.Customize the
client_config.lua
andserver_config.lua
to your needs. - 6.Start the script.

The console output should look like this if you have done everything correct.
If you are using esx_ambulancejob go into
esx_ambulancejob/client/main.lua
and replace:Old
New
esx_ambulancejob\client\main.lua
AddEventHandler('esx:onPlayerSpawn', function()
isDead = false
if firstSpawn then
firstSpawn = false
if Config.SaveDeathStatus then
while not ESX.PlayerLoaded do
Wait(1000)
end
ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(shouldDie)
if shouldDie then
Wait(1000)
SetEntityHealth(PlayerPedId(), 0)
end
end)
end
end
end)
function OnPlayerDeath()
isDead = true
ESX.UI.Menu.CloseAll()
TriggerServerEvent('esx_ambulancejob:setDeathStatus', true)
StartDeathTimer()
StartDistressSignal()
StartScreenEffect('DeathFailOut', 0, false)
end
esx_ambulancejob\client\main.lua
AddEventHandler('esx:onPlayerSpawn', function()
isDead = false
end)
function OnPlayerDeath()
ESX.UI.Menu.CloseAll()
end
Revive Command (esx_ambulancejob)
To integrate the revive command, please do the following:
- 1.Open the file
server/main.lua
inside theesx_ambulancejob
-folder and search for the command "revive" and replace it with following code.
ESX 1.1 or older
ESX 1.2, Legacy or newer
server/main.lua
TriggerEvent('es:addGroupCommand', 'revive', 'admin', function(source, args ,user)
if args[1] ~= nil then
if GetPlayerName(tonumber(args[1])) ~= nil then
TriggerClientEvent('esx_ambulancejob:revive', tonumber(args[1]))
TriggerClientEvent('visn_are:resetHealthBuffer', tonumber(args[1]))
end
else
TriggerClientEvent('esx_ambulancejob:revive', source)
TriggerClientEvent('visn_are:resetHealthBuffer', source)
end
end, function(source, args, user)
TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient permissions.'}})
end, { help = _U('revive_help'), params = {{ name = 'id'}}})
server/main.lua
ESX.RegisterCommand('revive', 'admin', function(xPlayer, args, showError)
args.playerId.triggerEvent('esx_ambulancejob:revive')
args.playerId.triggerEvent('visn_are:resetHealthBuffer')
end, true, {help = _U('revive_help'), validate = true, arguments = { {name = 'playerId', help = 'The player id', type = 'player'} }})
If you are using qb-ambulancejob go into
qb-ambulancejob/fxmanifest.lua
and remove the following lines from client_scripts:'client/wounding.lua'
'client/laststand.lua'
'client/dead.lua'
Revive Command (qb-ambulancejob)
To integrate the revive command, please do the following:
- 1.Open the file
server/main.lua
inside theqb-ambulancejob
-folder and search for the command "revive" and replace it with following code.
qb-ambulancejob 1.0.0
server/main.lua
QBCore.Commands.Add("revive", Lang:t('info.revive_player_a'), {{name = "id", help = Lang:t('info.player_id')}}, false, function(source, args)
local src = source
if args[1] then
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
TriggerClientEvent('hospital:client:Revive', Player.PlayerData.source)
TriggerClientEvent('visn_are:resetHealthBuffer', Player.PlayerData.source)
else
TriggerClientEvent('QBCore:Notify', src, Lang:t('error.not_online'), "error")
end
else
TriggerClientEvent('hospital:client:Revive', src)
TriggerClientEvent('visn_are:resetHealthBuffer', src)
end
end, "admin")
This script works out of the box for standalone. If you want to integrate custom framework things, have a look inside
visn_are/script/helpers/s_functions.lua
.A revive command is included in the script. You can enable it in the Server Config. In order to customize the permissions for it have a look inside
visn_are/script/helpers/s_functions.lua
.Last modified 11mo ago