SLEEK REVIVE STATION
Here check the installation guide
Last updated
Here check the installation guide
Last updated
This script is compatible with ESX and QB
This script is compatible with esx_ambulancejob, qb_ambulance, wasabi_ambulance and ars_ambulancejob and any other system, as you can add the export in the open.lua
file.
INSTALLATION GUIDE
Download from KEYMASTER and Unzip the sleek-revivestation.pack.zip
and place this folder in your server's resource folder.
Add the resource to your server start config: ensure sleek-revivestation
, the name of the folder must not be changed or the resource will not function correctly. Ensure the script is the latest one.
ensure es_extended -- or qb-core
-- All the other resources
ensure sleek-revivestation
Open the config.lua and configure it correctly, paying attention to all the variables, especially the open functions that you need to fill in according to your systems, like the Notifications one.
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 = { }
-- _____ _____ _ _ ______ _____ _____ _ _______ ___ _____ _____ _____ _ _
-- / __ \ _ | \ | || ___|_ _| __ \ | | | ___ \/ _ \_ _|_ _| _ | \ | |
-- | / \/ | | | \| || |_ | | | | \/ | | | |_/ / /_\ \| | | | | | | | \| |
-- | | | | | | . ` || _| | | | | __| | | | /| _ || | | | | | | | . ` |
-- | \__/\ \_/ / |\ || | _| |_| |_\ \ |_| | |\ \| | | || | _| |_\ \_/ / |\ |
-- \____/\___/\_| \_/\_| \___/ \____/\___/\_| \_\_| |_/\_/ \___/ \___/\_| \_/
-- Specify the framework to use: 'esx' or 'qbcore'
Config.Framework = 'esx' -- Choose between 'esx' or 'qbcore'
-- Database configuration: Specifies the MySQL wrapper for database interactions.
Config.SQLWrapper = 'oxmysql' -- Common choices include 'ghmattimysql', 'mysql-async', 'oxmysql'
-- Toggle the usage of a target system. Set to true or false.
Config.UseTargetSystem = false
Config.TargetSystem = 'qb-target' -- Choose between 'qb-target' or 'ox_target'
-- UI Customization Settings
Config.UI = {
colors = {
color1 = '#00c5ff',
color2 = '#31afd4',
color3 = '#940900',
color4 = 'rgba(255, 0, 0, 0.43)',
color5 = '#ff0000',
color6 = 'rgba(0, 197, 255, 0.43)'
},
translations = { -- Text translations for the UI
menutitle = 'Revive Station',
areyousure = 'Are you sure about this?',
confirmmessage = 'If you do, you will be charged $%s .',
confirmyes = 'Yes',
confirmno = 'No'
}
}
-- These are the open functions of the script:
Config.Functions = {
DrawText = function(text) -- To change the export or modify the Text UI of the floating text as you like.
AddTextEntry('ALERT_MESSAGE', text)
BeginTextCommandDisplayHelp('ALERT_MESSAGE')
EndTextCommandDisplayHelp(0, false, false, -1)
end,
Notify = function(text) -- Here put the export of the notification system you use.
if Config.Framework == 'esx' then
ESX.ShowNotification(text)
elseif Config.Framework == 'qbcore' then
QBCore.Functions.Notify(text)
end
end,
AlertPolice = function(coords) -- This function is used to alert the police
-- ESX / QBCore
TriggerServerEvent('sleek-death:alertPolice')
-- CODESIGN
-- local data = exports['cd_dispatch']:GetPlayerInfo()
-- TriggerServerEvent('cd_dispatch:AddNotification', {
-- job_table = { 'police' },
-- coords = vector3(coords.x, coords.y, coords.z),
-- title = 'Illegal revive station is in use',
-- message = 'Illegal revive station is in use',
-- flash = 0,
-- unique_id = data.unique_id,
-- sound = 1,
-- blip = {
-- sprite = 431,
-- scale = 1.2,
-- colour = 3,
-- flashes = false,
-- text = 'Illegal revive station',
-- time = 5,
-- radius = 0
-- }
-- })
-- QUASAR
-- TriggerServerEvent('qs-dispatch:server:CreateDispatchCall', {
-- job = { 'police' },
-- callLocation = vector3(coords.x, coords.y, coords.z),
-- callCode = { code = '<CALL CODE>', snippet = '<CALL SNIPPED EX: 10-10>' },
-- message = 'Illegal revive station is in use',
-- 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 = 'Illegal revive station is in use', -- blip text
-- time = (20 * 1000) --blip fadeout time (1 * 60000) = 1 minute
-- }
-- })
end
}
-- These are the translations for the script:
Config.Translation = {
openmenutext = 'Press ~INPUT_CONTEXT~ to open the revive menu',
openmenutarget = 'Open the revive station',
itemmissing = 'You don\'t have the needed items',
notenoughmoney = 'You don\'t have enough money',
policealert = 'Illegal revive station is in use'
}
-- Revive Station Configuration
Config.ReviveStations = {
Legal = {
{
position = vector3(299.736267, -574.325256, 43.248291), -- Coordinates for the revive station
reviveRange = 20, -- Range around the station where actions are valid
markerSettings = {
enabled = true, -- Set to true to display a marker
type = 2, -- Marker type
colorR = 222, -- Red component of marker color
colorG = 186, -- Green component of marker color
colorB = 77, -- Blue component of marker color
alpha = 255 -- Marker transparency
},
blipSettings = {
enabled = true, -- Set to true to display a blip on the map
id = 369, -- Blip ID
color = 17, -- Blip color
scale = 0.7, -- Blip scale
display = 2, -- Blip display type
name = 'Hospital' -- Blip name
},
npcSettings = {
enabled = true, -- Enable or disable NPC presence
heading = 209.1426, -- NPC heading
model = 's_m_m_dockwork_01', -- NPC model
playAnimation = true, -- Enable or disable NPC animation
animationScenario = 'WORLD_HUMAN_CLIPBOARD', -- Scenario to play (e.g., 'WORLD_HUMAN_CLIPBOARD')
},
requireItem = false, -- Whether an item is required to use the station
itemName = 'sandwich', -- Required item
reviveCost = 1500, -- Price to revive
currencyType = 'cash' -- Currency type
},
-- Add more legal revive stations here following the same structure
},
Illegal = {
{
position = { -- Multiple coordinates for the NPC. The NPC will appear at a different location each time the script restarts.
vector3(781.0562, 1274.8711, 361.2846),
vector3(784.8076, 1294.3521, 360.2969),
vector3(769.6848, 1284.7415, 360.2969)
},
reviveRange = 20, -- Range around the station where actions are valid
markerSettings = {
enabled = true, -- Set to true to display a marker
type = 2, -- Marker type
colorR = 222, -- Red component of marker color
colorG = 186, -- Green component of marker color
colorB = 77, -- Blue component of marker color
alpha = 255 -- Marker transparency
},
blipSettings = {
enabled = true, -- Set to true to display a blip on the map
id = 369, -- Blip ID
color = 17, -- Blip color
scale = 0.7, -- Blip scale
display = 2, -- Blip display type
name = 'Black Hospital' -- Blip name
},
npcSettings = {
enabled = true, -- Enable or disable NPC presence
heading = 252.45, -- NPC heading
model = 's_m_m_dockwork_01', -- NPC model
playAnimation = true, -- Enable or disable NPC animation
animationScenario = 'WORLD_HUMAN_CLIPBOARD', -- Scenario to play (e.g., 'WORLD_HUMAN_CLIPBOARD')
},
requireItem = false, -- Whether an item is required to use the station
itemName = 'illegal_phone', -- Required item
reviveCost = 1000, -- Price to revive
currencyType = 'black_money', -- Currency type
alertPolice = false, -- Whether to call the police
policeAlertChance = 20 -- Chance (in percentage) of notifying the police (0% to 100%)
},
-- Add more illegal revive stations here following the same structure
}
}
function RevivePlayer(id) -- Replace it with the one from your ambulance system.
-- ESX
TriggerClientEvent('esx_ambulancejob:revive', id)
-- QBCore
-- TriggerClientEvent('hospital:client:Revive', id)
-- Wasabi Ambulance
-- exports.wasabi_ambulance:RevivePlayer(id)
-- Ars Ambulance
-- TriggerClientEvent('ars_ambulancejob:healPlayer', id, {revive = true})
end
function IsPlayerDead(player)
return IsEntityDead(GetPlayerPed(player))
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.