SLEEK DEATH SCREEN
Here check the installation guide
Last updated
Here check the installation guide
Last updated
This script is compatible with ESX and QB
Compatible with esx_ambulancejob, qb_ambulance, wasabi_ambulance and ars_ambulancejob.
INSTALLATION GUIDE
Download from KEYMASTER and Unzip the sleek-death.pack.zip
and place this folder in your server's resource folder.
Add the resource to your server start config: ensure sleek-death
, the name of the folder must not be changed or the resource will not function correctly.
ensure es_extended -- or qb-core
ensure sleek-death
You must delete any other death screens you have. To delete the ESX default you must:
esx_ambulancejob/client/main.lua -> line 357
(This can vary depending on the version you have):
OnPlayerDeath()
Clear the cache of your server and also of your own FiveM.
Reboot the entire server with the forge script well ensured in your server.cfg.
Download from KEYMASTER and Unzip the sleek-death.pack.zip
and place this folder in your server's resource folder.
Add the resource to your server start config: ensure sleek-death
, the name of the folder must not be changed or the resource will not function correctly.
ensure es_extended -- or qb-core
ensure sleek-death
You must delete any other death screens you have. From qb-ambulancejob
, you need to remove the following lines from dead.lua
, related to the laststand event:
--[[
elseif InLaststand then
sleep = 5
if LaststandTime > Config.MinimumRevive then
DrawTxt(0.94, 1.44, 1.0, 1.0, 0.6, Lang:t('info.bleed_out', { time = math.ceil(LaststandTime) }), 255, 255, 255, 255)
else
DrawTxt(0.845, 1.44, 1.0, 1.0, 0.6, Lang:t('info.bleed_out_help', { time = math.ceil(LaststandTime) }), 255, 255, 255, 255)
if not emsNotified then
DrawTxt(0.91, 1.40, 1.0, 1.0, 0.6, Lang:t('info.request_help'), 255, 255, 255, 255)
else
DrawTxt(0.90, 1.40, 1.0, 1.0, 0.6, Lang:t('info.help_requested'), 255, 255, 255, 255)
end
end
if IsControlJustPressed(0, 47) and not emsNotified then
TriggerServerEvent('hospital:server:ambulanceAlert', Lang:t('info.civ_down'))
emsNotified = true
end
end
--]]
If you have any doubts, you can download a modified dead.lua
file here. However, be cautious as it might belong to an older version than yours! It's better to manually delete the event.
Clear the cache of your server and also of your own FiveM.
Reboot the entire server with the forge script well ensured in your server.cfg.
CONFIG
The following will explain all the settings, one of the most important things that I recommend you spend a few minutes to understand in order to offer your users the best possible experience.
Config = Config or {}
-- _____ _____ _ _ ______ _____ _____ _ _______ ___ _____ _____ _____ _ _
-- / __ \ _ | \ | || ___|_ _| __ \ | | | ___ \/ _ \_ _|_ _| _ | \ | |
-- | / \/ | | | \| || |_ | | | | \/ | | | |_/ / /_\ \| | | | | | | | \| |
-- | | | | | | . ` || _| | | | | __| | | | /| _ || | | | | | | | . ` |
-- | \__/\ \_/ / |\ || | _| |_| |_\ \ |_| | |\ \| | | || | _| |_\ \_/ / |\ |
-- \____/\___/\_| \_/\_| \___/ \____/\___/\_| \_\_| |_/\_/ \___/ \___/\_| \_/
Config.framework = 'ESX' -- Options: 'ESX', 'QB'
-- General configuration
Config.ArsAmbulance = true -- Set to true to use Ars AmbulanceJob integration
Config.Timer = 300 -- 300 seconds equals 5 minutes. Time to bleed out
Config.ReviveTimer = 100 -- The seconds until the "Revive" button appears on the screen
Config.UseExtraButton = true -- If you activate this, a third button will appear which will apply a function or command of your choice. In the client_open you can add the function
Config.LoseItemsOnSuicide = true -- true to lose items when you revive by pressing the revive button
Config.LoseItemsOnBleedingOut = true -- true to lose the items when you finish bleeding when the timer ends
Config.DisableVoiceChat = false -- If true, voice chat will be disabled while player is dead
Config.VoiceResource = 'pma-voice' -- Options: 'pma-voice', 'mumble-voip'
Config.UsePrison = false -- If you activate this, script will use the prison export to check if the player is in prison
Config.PrisonCoords = { -- When a player dead, if he is in prison, he will respawn to these coords. Only works if UsePrison is true
coords = {
x = 1775.3843, -- Coordinates where the player will be sent to prison
y = 2552.3630,
z = 45.5650
},
heading = 180.0,
}
-- Price charged for choosing to respawn early and the method of payment
Config.PriceForDeadEarly = {
amount = 1000, -- Amount in in-game currency
currencyType = "cash" -- 'cash' for cash payments, 'bank' for bank account deductions
}
-- Coordinates where players will respawn when they choose to respawn early
Config.RespawnCoords = {
coords = {
x = 298.7508, -- X coordinate
y = -1440.6846, -- Y coordinate
z = 29.7929 -- Z coordinate (altitude)
},
heading = 44.1302, -- Direction player faces upon respawning
}
-- Button configuration for death screen interactions
Config.Buttons = {
Suicide = {47, 'g'}, -- Button to trigger suicide
CallAmbulance = {38, 'e'}, -- Button to call an ambulance
Extra = { 303, 'u' } -- Button that you can customise its function in client_open
}
-- Text to be displayed in the UI when you die. Each time the UI comes out, one of them will come out.
Config.DeathMessages = {
{ top = 'You are almost dead #1', bottom = 'You\'ve just died because you tried to eat a clock. It was time-consuming #1' },
{ top = 'You are almost dead #2', bottom = 'You\'ve just died because you tried to eat a clock. It was time-consuming #2' },
{ top = 'You are almost dead #3', bottom = 'You\'ve just died because you tried to eat a clock. It was time-consuming #3' }
-- You can add as many as you want
}
-- User interface translations and notification messages
Config.Translation = {
UI = { -- UI text translations
Suicide = "Embrace to <span>death</span>",
Ambulance = "Notify <span>Ambulance</span>",
ExtraButton = 'Notify<span>NPC DOCTOR</span>',
ReviveAfter = 'You can revive after',
ReviveMessage = 'You can revive for <strong>$%s</strong> (you will lose all the items in inventory)'
},
Notifications = { -- Notifications and messages displayed to the user
MoneyRemoved = "You have been removed {money} for accepting to die early"
}
}
-- Main UI colour
Config.Colors = {
main = '#00b1d7'
}
-- RegisterNetEvent('sleek-death:codesignAlert', function(coords)
-- local data = exports['cd_dispatch']:GetPlayerInfo()
-- TriggerServerEvent('cd_dispatch:AddNotification', {
-- job_table = { 'ambulance' },
-- coords = vector3(coords.x, coords.y, coords.z),
-- title = 'Ambulance Alert',
-- message = 'New ambulance alert',
-- flash = 0,
-- unique_id = data.unique_id,
-- sound = 1,
-- blip = {
-- sprite = 431,
-- scale = 1.2,
-- colour = 3,
-- flashes = false,
-- text = 'Ambulance Alert',
-- time = 5,
-- radius = 0
-- }
-- })
-- end)
function Notify(playerId, message)
TriggerClientEvent('chat:addMessage', playerId, message)
end
function AlarmAmbulance(coords)
-- QBCore
-- for key, player in pairs(GetPlayers()) do
-- local qbPlayer = QBCore.Functions.GetPlayer(player)
-- if qbPlayer and qbPlayer.PlayerData.job.name == 'ambulance' then
-- qbPlayer.Functions.Notify('Ambulance Alarm')
-- end
-- end
-- ESX
-- for key, player in pairs(GetPlayers()) do
-- local esxPlayer = ESX.GetPlayerFromId(player)
-- if esxPlayer and esxPlayer.job.name == 'ambulance' then
-- esxPlayer.showNotification('Ambulance Alarm')
-- end
-- end
-- CODESIGN
-- TriggerClientEvent('sleek-death:codesignAlert', -1, coords)
-- QUASAR
-- TriggerEvent('qs-dispatch:server:CreateDispatchCall', {
-- job = { 'ambulance' },
-- callLocation = vector3(coords.x, coords.y, coords.z),
-- callCode = { code = '<CALL CODE>', snippet = '<CALL SNIPPED EX: 10-10>' },
-- message = 'Ambulance Alarm',
-- flashes = false, -- You can set to true if you need call flashing sirens...
-- image = 'URL', -- Url for image to attach to the call
-- -- You can use the getSSURL export to get this url
-- blip = {
-- sprite = 488, --blip sprite
-- scale = 1.5, -- blip scale
-- colour = 1, -- blip colour
-- flashes = true, -- blip flashes
-- text = 'Ambulance Alarm', -- blip text
-- time = (20 * 1000) --blip fadeout time (1 * 60000) = 1 minute
-- }
-- })
end
If you want to edit the aesthetics or design. You have the HTML open so you can modify the style and everything as you want.
The script is RESPONSIVE for all resolutions as well.