Amazing work and it’s always free with you ! thanks bro
i need it ;;
the items dont seem to work for healing the player. Can players heal themselves when they have the required item? I removed ambulance job from the config. would that make it so anyone can heal or no one can heal? Using QB-core
did u manage it to put it in cd_player hud?
With qb-inventory please ![]()
I managed to adapt it for qb-inventory.
in the end of client → main-lua
RegisterNetEvent(‘jx:sacacovid’, function()
RemoveIllnes(‘covid’)
TriggerServerEvent(‘jx:eliminarItemCovid’)
end)
RegisterNetEvent(‘jx:sacartos’, function()
RemoveIllnes(‘cough’)
TriggerServerEvent(‘jx:eliminarItemCough’)
end)
RegisterNetEvent(‘jx:sacartetanos’, function()
RemoveIllnes(‘tetanus’)
TriggerServerEvent(‘jx:eliminarItemtetanos’)
end)
RegisterNetEvent(‘jx:sacarhepatitis’, function()
RemoveIllnes(‘hepatits’)
TriggerServerEvent(‘jx:eliminarItemhepatitis’)
end)
RegisterNetEvent(‘jx:sacardiarrhea’, function()
RemoveIllnes(‘diarrhea’)
TriggerServerEvent(‘jx:eliminarItemdiarrhea’)
end)
RegisterNetEvent(‘jx:sacarvaricela’, function()
RemoveIllnes(‘chickenpox’)
TriggerServerEvent(‘jx:eliminarItemvaricela’)
end)
RegisterNetEvent(‘jx:sacardengue’, function()
RemoveIllnes(‘dengue’)
TriggerServerEvent(‘jx:eliminarItemdengue’)
end)
RegisterNetEvent(‘jx:sacarmosquitos’, function()
LocalPlayer.state:set(‘offlotion’,true,true)
TriggerServerEvent(‘jx:eliminarItemoff’)
end)
RegisterNetEvent(‘jx:subirinmune’, function()
immunesystem = 100
TriggerServerEvent(‘jx:eliminarItemmultivitaminas’)
end)
in the end of server → main.lua
– covid
QBCore.Functions.CreateUseableItem(‘molnupiravir’, function(playerId)
TriggerClientEvent(‘jx:sacacovid’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemCovid’)
AddEventHandler(‘jx:eliminarItemCovid’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘molnupiravir’) then
xPlayer.Functions.RemoveItem(‘molnupiravir’, 1)
end
end)
– tos
QBCore.Functions.CreateUseableItem(‘ambroxol’, function(playerId)
TriggerClientEvent(‘jx:sacartos’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemCough’)
AddEventHandler(‘jx:eliminarItemCough’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘ambroxol’) then
xPlayer.Functions.RemoveItem(‘ambroxol’, 1)
end
end)
– tetanos
QBCore.Functions.CreateUseableItem(‘metronidazole’, function(playerId)
TriggerClientEvent(‘jx:sacartetanos’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemtetanos’)
AddEventHandler(‘jx:eliminarItemtetanos’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘metronidazole’) then
xPlayer.Functions.RemoveItem(‘metronidazole’, 1)
end
end)
– hepatitis
QBCore.Functions.CreateUseableItem(‘baraclude’, function(playerId)
TriggerClientEvent(‘jx:sacarhepatitis’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemhepatitis’)
AddEventHandler(‘jx:eliminarItemhepatitis’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘baraclude’) then
xPlayer.Functions.RemoveItem(‘baraclude’, 1)
end
end)
– diarrhea
QBCore.Functions.CreateUseableItem(‘diatabs’, function(playerId)
TriggerClientEvent(‘jx:sacardiarrhea’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemdiarrhea’)
AddEventHandler(‘jx:eliminarItemdiarrhea’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘diatabs’) then
xPlayer.Functions.RemoveItem(‘diatabs’, 1)
end
end)
– varicela
QBCore.Functions.CreateUseableItem(‘antihistamine’, function(playerId)
TriggerClientEvent(‘jx:sacarvaricela’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemvaricela’)
AddEventHandler(‘jx:eliminarItemvaricela’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘antihistamine’) then
xPlayer.Functions.RemoveItem(‘antihistamine’, 1)
end
end)
– dengue
QBCore.Functions.CreateUseableItem(‘acetaminophen’, function(playerId)
TriggerClientEvent(‘jx:sacardengue’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemdengue’)
AddEventHandler(‘jx:eliminarItemdengue’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘acetaminophen’) then
xPlayer.Functions.RemoveItem(‘acetaminophen’, 1)
end
end)
– dengue
QBCore.Functions.CreateUseableItem(‘offlotion’, function(playerId)
TriggerClientEvent(‘jx:sacarmosquitos’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemoff’)
AddEventHandler(‘jx:eliminarItemoff’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘offlotion’) then
xPlayer.Functions.RemoveItem(‘offlotion’, 1)
end
end)
–multivitaminas
QBCore.Functions.CreateUseableItem(‘multivitamins’, function(playerId)
TriggerClientEvent(‘jx:subirinmune’, playerId)
end)
RegisterNetEvent(‘jx:eliminarItemmultivitaminas’)
AddEventHandler(‘jx:eliminarItemmultivitaminas’, function()
local src = source
local xPlayer = QBCore.Functions.GetPlayer(src)
if xPlayer.Functions.GetItemByName(‘multivitamins’) then
xPlayer.Functions.RemoveItem(‘multivitamins’, 1)
end
end)
ily
bby
is there an export than cures all illness? cause after being revived I still got illness
is there an event for the radial menu to display status about it