Currently at V1.1.2 for bug fixes
For ESX or QBCORE
Medical RP continues to be a big miss in most servers. To try and fix this I thought I would take a shot at an medical RP add on by writing a disease/illness script to help create more interactions between medical personnel and other civilians.
FEATURES
Three different ‘catchable’ illnesses with their own unique interactions.
0.00ms RESMON
Easily Configurable
QBCORE and ESX ready
Use either /command or Items to cure illness
Images provided
GitHub Link: Medical Disease/Illness
Youtube Link: Preview
Other Free Scripts By Me:
Elevators
Free VIN Scratch
Car Flipping
Metal Detectors
Loot Boxes
Gang Heist
Police Database Search
Police K9
Yacht Heist
Billing
Medical Diseases / Illnesses
Drug Harvest
Police Cell Ping
Number Game
Civilian Job Mega Pack
Simple Craft
Target Ping
Full Steal
Bank Truck Robbery
Paid Scripts by Me:
Fuel Delivery Job
Rep Based Vehicle Heist
Mining/Delivery Job
Police Tracker
Police Impound & Tow Job
Bank Job
26 Likes
how often does a player get sick?
Anyway to impliment a clothing item (mask) to prevent sickness?
Just installed, havent gotten sick yet but taking all 3 meds tells me “You took the wrong kind”. neither of the 3 meds say “your not sick” (qbcore)
how often does a player get sick?
By default players have a 1 in 2 chance of getting sick every X minutes based on the Config.IllnessCheck.
You can change the 1 in 2 chance by updating the maximum value of the math.random check at about line 80 ( local getSick = math.random(1,2) )
Just installed, havent gotten sick yet but taking all 3 meds tells me “You took the wrong kind”. neither of the 3 meds say “your not sick” (qbcore)
Thank you for pointing out that the your not sick notification was not working, I have fixed that on the latest client version.
Anyway to impliment a clothing item (mask) to prevent sickness?
Sure, just add your relevant code check at line at about line 81 at the ( if getSick == 1 and not isSick then ) check.
1 Like
Is there a way to know what sickness you have instead of having to guess what meds to take?
1 Like
Hi ! If player disconnect server, and he reconnect to server, he always sick ?
2 Likes
I disconnected while sick i believe and on relog im sick and none of the 3 meds work cure me.
1 Like
if your only coughing take cough med.
if your vomiting take nausea
if your dizzy and screen crazy you need the ginger
what about for new sicknesses? that players create
Illnesses are not persistent, on disconnect they will lose their illness.
1 Like
What do you have your Config.IllnessCheck set to? Anything lower than three minutes can have odd effects, I did release another client update to help against the low chance of getting multiple diseases effects at once.
There is no built in way to create diseases, if you choose to add additional disease you will need coding experience to build and implement them into the script. If you do so please feel free to add a pull request to the github so that everyone can benefit from your new disease addition.
2 Likes
Shiny, I like the new banner style you’ve been using.
1 Like
Awesome , ill load it up on the test server and check it out shortly.
In case anyone is too lazy , here are the items to add to your shared lua
['coughmedicine'] = {['name'] = 'coughmedicine', ['label'] = 'cough medicine', ['weight'] = 0, ['type'] = 'item', ['image'] = 'coughmedicine.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'meds for cough'},
['gingermedicine'] = {['name'] = 'gingermedicine', ['label'] = 'ginger medicine', ['weight'] = 0, ['type'] = 'item', ['image'] = 'gingermedicine.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'meds for dizzyness'},
['nasuamedicine'] = {['name'] = 'nasuamedicine', ['label'] = 'nasua medicine', ['weight'] = 0, ['type'] = 'item', ||['image'] = 'nasuamedicine.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'meds for nasua'},```
1 Like
For anyone using custom notifications, I had put the wrong event in (linking it to my paid VIN scratch) I fixed the event in the newest config.
I use ox_inventory but cant take the medicine
probably have to make them usable items with your ox. or use command
1 Like
Try the following:
One fix that may help you is to remove the if then statement on the server side item registry.
(delete the if/then/end)
1 Like
You mean this part?
ESX.RegisterUsableItem(Config.CoughDrug, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer.removeInventoryItem(Config.CoughDrug, 1) then
TriggerEvent('angelicxs-MedicalDiseases:CureDisease',source, 'coughing')
end
end)
ESX.RegisterUsableItem(Config.VomitDrug, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer.removeInventoryItem(Config.VomitDrug, 1) then
TriggerEvent('angelicxs-MedicalDiseases:CureDisease',source, 'vomiting')
end
end)
ESX.RegisterUsableItem(Config.DizzyDrug, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer.removeInventoryItem(Config.DizzyDrug, 1) then
TriggerEvent('angelicxs-MedicalDiseases:CureDisease',source, 'dizzy')
end
end)
Yes change it to:
ESX.RegisterUsableItem(Config.CoughDrug, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem(Config.CoughDrug, 1)
TriggerEvent('angelicxs-MedicalDiseases:CureDisease',source, 'coughing')
end)
ESX.RegisterUsableItem(Config.VomitDrug, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem(Config.VomitDrug, 1)
TriggerEvent('angelicxs-MedicalDiseases:CureDisease',source, 'vomiting')
end)
ESX.RegisterUsableItem(Config.DizzyDrug, function(source)
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.removeInventoryItem(Config.DizzyDrug, 1)
TriggerEvent('angelicxs-MedicalDiseases:CureDisease',source, 'dizzy')
end)