ScriptsM Drink From Lake
I'm glad to present this realistic script to allow players drink from every water source is exist. Player can get vomit by drinking salt water from sea or ocean, pour water into empty botel, pour water out from bottle with realistic sounds and particles.
Installation
Download a resource (opens in a new tab) from keymaster or buy it by buttons at the top
Install all resource dependencies
Resource start order
It's important for your resources to start in a logical order to prevent errors from missing dependencies.
start framework
start PolyZone
start SM-Drink
Config
There you can find an config of resource with description for all params
Config = {}
Config.Status = true -- Dont turn it off
Config.Framework = 'esx' -- esx/qb
Config.SaltWaterBonus = 100000 -- Salt water thirst minus
Config.SaltHungerBonus = 100000 -- Salt water hunger minus
Config.FountainBonus = 60 -- Fountain thirst bonus
Config.PressWaterBonus = 50000 -- Fresh water bonus
Config.EmptyBottleName = 'bottle' -- Empty bottle inventory name
Config.SaltBottleName = 'bottlesalt' -- Bottle with salt water inventory name
Config.PressBottleName = 'bottlepress' -- Bottle with fresh water inventory name
Config.WaterObj = 'prop_ld_flow_bottle' -- Bottle prop
Config.FountainProps = { -- Fountain object name
{hash = 'prop_w_fountain_01'}
}
Config.FountainRadius = 1.5 -- Fountain drink radius
Config.NotInWater = function() -- Not in water to pour to bottle
exports['t-notify']:Custom({ -- Notification export
style = 'message',
title = 'Pour water',
message = 'You are not in water',
sound = true,
duration = 5500
})
end
Config.PersistNotify = function() -- Persist notify to drink from source without bottle
exports['t-notify']:Persist({
id = 'drinkhelp',
step = 'start',
options = {
style = 'message',
title = 'Drink water',
message = 'Drink: [E]',
sound = true
}
})
end
Config.EndPersistNotify = function() -- End persist notify to drink from source without bottle
exports['t-notify']:Persist({
id = 'drinkhelp',
step = 'end'
})
end
Config.PersistNotifyDrink = function() -- Persist notify to drink from bottle
exports['t-notify']:Persist({
id = 'drinkhelpsalt',
step = 'start',
options = {
style = 'message',
title = 'Drink water',
message = 'Drink: [E], Pour out: [G], Cancel: [X]',
sound = true
}
})
end
Config.EndPersistNotifyDrink = function() -- End persist notify to drink from bottle
exports['t-notify']:Persist({
id = 'drinkhelpsalt',
step = 'end'
})
end
Config.EmptyPersistNotifyDrink = function() -- Empty bottle persist notify
exports['t-notify']:Persist({
id = 'drinkhelpempty',
step = 'start',
options = {
style = 'message',
title = 'Empty bottle',
message = 'Pour water: [E], Cancel: [X]',
sound = true
}
})
end
Config.EndEmptyPersistNotifyDrink = function() -- End empty bottle persist notify
exports['t-notify']:Persist({
id = 'drinkhelpempty',
step = 'end'
})
end