πFeeding Horse + Syringe
π¦ Client Side
TriggerEvent("Botiv:giveFoodToHorse", [ID])
-- or
TriggerEvent("Botiv:giveFoodToHorse", [ITEM])/feedhorse [ID] -- Feed with item by numeric ID
/feedhorse [ITEM] -- Feed with item nameπ§ Server Side
VORP Example
local vorpInventory = exports.vorp_inventory:vorp_inventoryApi()
vorpInventory.RegisterUsableItem("syringe", function(data)
TriggerClientEvent("Botiv:giveFoodToHorse", data.source, "syringe")
end)
RegisterServerEvent("botiv-FeedHorse:itemUsed")
AddEventHandler("botiv-FeedHorse:itemUsed", function(item, used)
if used then
vorpInventory.subItem(source, item, 1)
end
end)RedEM Example
βοΈ Configuration Example (config.lua)
config.lua)π Notes
Last updated