Skip to content

About

The ACTUAL real code for the inventoryhud that is not broken

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[ESX] [DISC] disc-inventoryhud

The ACTUAL real code for the inventoryhud that is not broken

ESX Compatibility

This is a fork for use with the inventory Rex's ESX

Events

Add Item Event

TriggerEvent('disc-inventoryhud:addItem', source, name, count)

Remove Item Event

Can only be used in Item Use Callback

TriggerEvent('disc-inventoryhud:removeItem', source, item.Id, 1, item.Slot, item.Inventory)

Register Item for Use

TriggerEvent('disc-inventoryhud:registerItemUse', item, cb)

Example (Courtesy of esx_basicneeds)

TriggerEvent('disc-inventoryhud:registerItemUse', "water", function(source, item)
	local xPlayer = ESX.GetPlayerFromId(source)
	TriggerEvent('disc-inventoryhud:removeItem', source, item.Id, 1, item.Slot, item.Inventory)

	TriggerClientEvent('esx_status:add', source, 'thirst', 200000)
	TriggerClientEvent('esx_basicneeds:onDrink', source)
	TriggerClientEvent('esx:showNotification', source, _U('used_water'))
end)

Check Has Item

TriggerEvent('disc-inventoryhud:hasItem', source, 'bread', function(hasItem)
    if hasItem then
        print('Has Item')
    else
        print('No Item')
    end
end)

REQUIREMENTS

disc-base repo

BETA

This version contains everything besides shops and weapons.

Stream

I stream on Twitch. Come hang out and learn from me!

Other Downloads

Other Downloads available on my repo

About

The ACTUAL real code for the inventoryhud that is not broken

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages