Item
["water"] = {
name = "water",
label = "Water",
weight = 1000,
type = "item",
durability = 1.0, -- 1 hour
decay = true, -- will be removed if item quality reach to 0
close = true, -- close inventory on use item
limit = 100, -- total limit (only applied to player inventory)
stacksize = 10, -- limit for each slot
client = {
onUse = function(item)
--this code will execute on item use
end,
onAdd = function(item)
--this code will execute when you reveive this item
end,
onRemove = function(item)
--this code will execute when item removed from your inventory
end,
TriggerEvent = 'Your Trigger Name Here',
TriggerServerEvent = 'Your Server Trigger Name Here',
},
server = {
onUse = function(source, item)
--this code will execute on item use
end,
onAdd = function(source, slot)
--this code will execute when you reveive this item
end,
onRemove = function(source, slot)
--this code will execute when item removed from your inventory
end,
TriggerEvent = 'Trigger Name Here',
TriggerCientEvent = 'Your Client Trigger Name Here',
},
consume = {
attachment = { -- optional
prop = 'prop_ld_flow_bottle',
bone = 18905,
position = vector3(0.12, 0.008, 0.03),
rotation = vector3(240.0, -60.0, 0.0)
},
--[[
attachment2 = { -- optional
prop = 'prop_ld_flow_bottle',
bone = 18905,
position = vector3(0.12, 0.008, 0.03),
rotation = vector3(240.0, -60.0, 0.0)
},
]]
animation = { -- optional
dict = 'mp_player_intdrink',
anim = 'loop_bottle',
blendIn = 2.0,
blendOut = 2.0,
flag = 49,
},
progress = { -- optional
label = 'Drinking Water',
disable = {
car = false,
combat = false,
move = false,
}
},
status = { -- optional
hunger = 50, --negative value supported (-50)
thirst = 50, --negative value supported (-50)
stress = 25, --negative value supported (-25)
},
delay = 5000,
remove = 0.4, -- set 1 to remove 1 item after consuming. If you set 0.4 then it will remove 40% item quality
}
},
Last updated