esx_basicneeds

MLO-uri, interioare, hărți optimizate și asset-uri pentru stream.
Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 4444
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

esx_basicneeds

Post by greenie »

https://github.com/esx-framework/ESX-Le ... basicneeds

This script implements hunger and thirst status, they can be increased when eating bread or drinking water.

Configuration
Config.Visible (deprecated)

type: boolean
default: true
description: Show or hide the hunger and thirst status.
Config.Items

type: table
description: Register Items that can be used as food or drinks.
layout:
Config.Items = {
['item'] = { -- Item name
type = 'food', -- "food" or "drink"
prop = "prop_name",
status = 200000, -- how much status will be increased
remove = true, -- remove item after use
anim = {dict = 'anim_dict', name = 'anim_name', settings = {8.0, -8, -1, 49, 0, 0, 0, 0}}, -- animation for eating/drinking
pos = vector3(0.15, 0.03, 0.0), -- prop position
rot = vector3(15.0, 175.0, 5.0) -- prop rotation
},
}
Events
resetStatus
Client-Sided: Reset the hunger and thirst status.

TriggerEvent('esx_basicneeds:resetStatus')
healPlayer
Client & Server Sided: Heal the player.

TriggerEvent('esx_basicneeds:healPlayer')
TriggerClientEvent('esx_basicneeds:healPlayer', source)
onUse
Client-Sided: Triggered when the player uses an item.

RegisterNetEvent('esx_basicneeds:onUse', function(itemType, propName, anim, pos, rot)
-- Do something
end)
𝑴𝒂𝒚𝒃𝒆 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 𝒊𝒔 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☢️

✅ GAZDUIRE JOCURI / VPS / GAZDUIRE WEB / SERVERE DEDICATE - Stock NELIMITAT / Valabil comandati pe https://www.zonek.ro/
Post Reply

Return to “Server Resources”