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


#1

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.

[DOWNLOAD]


#2

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


#3

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


#4

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


#5

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:


#6

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

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

#7

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

And removed the code that is not in use.


#8

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


#9

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


#10

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.


#11

This is really cool!


#12

Have you tried the antibiotics?


#13

There is also a cooldown on 15-30 minutes.


#14

I’m glad you liked it.


#15

[UPDATE]
The antibiotics are now working properly.