Today I present my first script. This script was made a few months ago than edited and perfected. It is not much but it is made to add a small amount of detail to your roleplay.
Wash Hands script for fivem servers
This is my first ever script. It’s not much but it’s something I couldn’t find on the forums so decided to try and make it my self
Info
- Resmond 0.00ms idle, 0.01ms when beginning to wash hands, 0.01ms when finishing washing hands
- Currently the script uses gtaDPS Burgershot MLO and PablitoMamutoPaputo Taco Restaurant.
- Quick and easy config
- Preview SG Wash Hands | Wash your hands in fivem! - YouTube
- The script is standalone
Installation
- Download the file
- Extract to resources folder
- start in your server.cfg
- Done!
Dependencies
You can get it on Github Here
Do not reupload the script and claim it as your own
You are free to modify and change the script how ever you like
Since I have very limited knowledge with coding in general and in fivem I won’t be able to help if you encounter any issues.
All rights go to the creator of the script and all rights go to the creators of following dependencies
If you modify the script in any way that you think might make it better please contact me
This was already uploaded a few months ago but than removed due to issues
2 Likes
did something similar in all the jobs i made but i made them have a check for handwashing as well! the people said they wanted immersion right?! lol good work!
3 Likes
Cool idea but I suggest doing it this way so more sinks can be added a lot easier
Sinks = {
{ name = 'Burgershot_sink', coords = vector3(-1198.13, -903.0, 14.0), length = 0.8, width = 0.8, heading = 35.0, minZ = 13.55, maxZ = 13.95, distance = 1.5 }
}
Citizen.CreateThread(function()
for i=1, #Sinks, 1 do
local v = Sinks[i]
exports['qtarget']:AddBoxZone(v.name, v.coords, v.length, v.width, {
name = v.name,
heading = v.heading,
--debugPoly=true,
minZ = v.minZ,
maxZ = v.maxZ
}, {
options = {
{
event = "sg-washhands:washHands",
icon = "fas fa-droplet",
label = "Wash Hands",
},
},
distance = v.distance
})
end
end)
1 Like
or for those using ox_lib
Sinks = {
{ name = 'Burgershot_sink', coords = vector3(-1197.56, -902.86, 13.97), length = 0.6, width = 0.8, heading = 35.0, minZ = 13.42, maxZ = 13.92, distance = 1.5 }
}
Citizen.CreateThread(function()
for i=1, #Sinks, 1 do
local v = Sinks[i]
exports['qtarget']:AddBoxZone(v.name, v.coords, v.length, v.width, {
name = v.name,
heading = v.heading,
--debugPoly=true,
minZ = v.minZ,
maxZ = v.maxZ
}, {
options = {
{
icon = "fas fa-droplet",
label = "Wash Hands",
action = function()
if lib.progressBar({
duration = 7500,
label = 'WASHING HANDS . . .',
useWhileDead = false,
canCancel = true,
disable = {
car = true,
move = true,
},
anim = {
scenario = 'PROP_HUMAN_BUM_BIN'
},
})
then
LocalPlayer.state.HandsWashed = true
lib.notify({
title = 'Notification',
description = 'Your hands are now washed',
type = 'success',
position = 'bottom'
})
end
end
},
},
distance = v.distance
})
end
end)
1 Like
New update is out! Download on github
Added Locals.lua to easily change the language
Added config to easily add and remove locations
Please share your thoughts and suggest any changes or additions!