[Release] ESX_KR_Illness - A script that makes you sick and cough


Simple skript, if you manage to get ill you will cough. If you take the antibiotics or let your body handle it you will get healthy again. Everything is randomized.



Siiick!!! Literally. Lol. Gonna see about making this work with vRP :slight_smile:


Thanks, i’m positive it will work on vRP too. Since i don’t use ESX that much unless you must have the antibiotics.


Just make sure to remove all ESX thing in the script, unless you want to get errors.


would it be possible to make players vomit in a future update?

Would be neat for the medics to get a place to buy antibiotics on the hospital
(Sorry for my bad English) :slight_smile:


Just some hints

From what i can see you dont use esx:playerLoaded in the client.

The var ESX = nil, is not needed either.

Since in client.lua you dont call a single esx function, the only place you call esx functionallity is in server.lua, so no need to have the extra lines of code in client.lua

Down below i typed the things you can remove from client.lua.

And to optimize the usage of math.random you should use math.randomseed(GetGameTimer()) to make the randomness even better.

ESX = nil

AddEventHandler('esx:playerLoaded', function(xPlayer)
  PlayerData = xPlayer


Did a pull request on github, with indentation of 4 thats used in ESX resources.

And removed the code that is not in use.


Yes i know, it was because i though the script was going to look different. I can go ahead and remove it anyway.


Wow, absolutely i’m going to take a look at it when i got the time. Thanks for your tip!


I tried this is in my server and it turned out like everyone ended up sick eventually there didn’t seem to be any cooldown.


This is really cool!


Have you tried the antibiotics?


There is also a cooldown on 15-30 minutes.


I’m glad you liked it.


The antibiotics are now working properly.