Installation
STEP 1 - Dependencies
STEP 2 - Start order
It is important to put the resources in the correct order, below es_extened but above the other scripts
In order for the resource to start correctly and not receive any errors, we must start the resources in the following order
ensure ox_lib
ensure ox_inventory
ensure rprogress
ensure deluxe-death
STEP 3 - Database
ALTER TABLE `users`
ADD `is_dead` TINYINT(1) NULL DEFAULT '0';
STEP 4 - Script Config
Config = {}
-- Time = Minutes, except the KnockTime (seconds)
Config.ESX = 'new' -- If you use esx above 1.8 keep new, otherwise old
Config.EventLoaded = 'esx:playerLoaded' -- Playerloaded trigger
Config.RespawnTime = 1 -- Time to respawn in minutes
Config.BleedOut = 30 -- Time before the user will bleed out in minutes
Config.KnockTime = 60 -- Time in seconds before they will go into death state
Config.DelayCall = 1 -- Time before they can call again for ambulance when they are down
Config.ChatMessage = false -- Enable chat message
Config.ChatHandlerCommand = 'ooc' -- Prefix of the command that should handle the chat message, example: If you use okokChat and you made a command to show in chat,
-- you should put the prefix here, as example: 'ooc' and then it will print the message that you can configure in the language config
Config.Progressbar = 'rprogress' -- You can choose [oxlib, rprogress]. If you put rprogress, make sure you started and downloaded rprogress script , if you choose oxlib, make sure to have ox_lib installed
Config.Phone = 'qs' -- You can choose between qs-smartphone, gcphone [qs, gcphone]. If you don't want a phone notification, set: none
Config.JobName = 'ambulance' -- Job name that will allow people with this job to use the ambulance menu
Config.UseMedikit = true -- Allow people to revive knocked down people with medikit
Config.MedikitItem = 'medikit' -- Item name that you want to use to revive people (if you set Usemedikit to false it won't work)+
Config.ReviveAdminCommand = 'revive' -- This command will revive the player with the id that you provide in the server (You can set whatever command you want.)
Config.ReviveAllAdminCommand = 'reviveall' -- This command will revive everyone online in the server (You can set whatever command you want.)
Config.Permissions = {'superadmin','admin'} -- Setup Permissions for command revive and revive all
Config.RespawnCoords = vector3(-1863.8765, -330.1922, 49.4430) -- Dead players will respawn there
Config.RegisterKeyMapping = true -- Open Menu with key
Config.RegisterKey = 'F6' -- Key to open the menu (has to be compatible with registerkeycommand fivem native), if RegisterKeyMapping is set to false it doesn't matter.
Config.OpenMenuWithCommand = true -- If you want to open the menu with a command
Config.OpenMenuCommand = 'menu-open'
Config.ClearInventoryAfterDeath = false -- If you want to completely clear the player inventory after he respawned and bleed out
Config.EnableDeathDrop = true -- If you want to enable the death drop put on true (You must have ox_inventory and you must set Config.ClearInventoryAfterDeath = false)
Config.DropOnlyWeapons = false -- If you want to drop only weapons on player's death
Config.DeathDropName = 'Deluxe Death Drop' -- Name of the dropped item's inventory on player's death
Config.AutomaticDoctor = true -- Enable or disable possibility for players to use a command to respawn
Config.DoctorCommand = 'doctor' -- Command that the user will have to type to revive
Config.DoctorsNumber = 1 -- Users will be able to use the Doctor command to revive themselves when less than DoctorsNumber that you set are online
Config.DoctorReviveTime = 5 -- Time for the players to respawn automatically with the doctor function
Config.PayDoctor = true -- If you want to enable payments for users to be able to use the doctor command
Config.PayDoctorAmount = 1000 -- Amount of money that the user have to pay to use the doctor command
STEP 5 - Webhook Config
Config = {}
-- Webhook Settings
Config.EnableWebHook = true -- Enable or disable the script webhook (death information) [true = active, false = disabled]
Config.WebhookURL = '' -- Your discord webhook link
Config.WebhookTitle = 'Deluxe Death Logs' -- The webhook title
-- Color Settings
Config.WebhookColorSuicide = '3145631' -- Green (Color for player suicide webhook)
Config.WebhookColorPlayerKill = '16711680' -- Red (Color for player kill webhook)
Config.WebhookColorPedKill = '16777073' -- Yellow (Color for player ped kill webhook)
STEP 6 - Disable Inventory when player is knocked / death
To disable players from being able to open their inventory,
you will just need to make some changes into ox_inventory/client.lua
Just replace the function OpenInventory like shown:
Old OpenInventory function:
local function canOpenInventory()
return PlayerData.loaded
and not invBusy
and not PlayerData.dead
and invOpen ~= nil
and (not currentWeapon or currentWeapon.timer == 0)
and not IsPedCuffed(playerPed)
and not IsPauseMenuActive()
and not IsPedFatallyInjured(playerPed)
end
Replace with:
local function canOpenInventory()
return PlayerData.loaded
and not invBusy
and exports['deluxe-death']:getDeath() == false
and invOpen ~= nil
and (not currentWeapon or currentWeapon.timer == 0)
and not IsPedCuffed(playerPed)
and not IsPauseMenuActive()
and not IsPedFatallyInjured(playerPed)
end
Last updated