Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggest] - update ox_inv/system thirst/hunger/stress #108

Open
Mesrine67 opened this issue Jun 6, 2024 · 3 comments
Open

[Suggest] - update ox_inv/system thirst/hunger/stress #108

Mesrine67 opened this issue Jun 6, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Mesrine67
Copy link
Contributor

The problem

potential problem when updating, consumables:server events are obseleted?

Ideal solution

would creating a new bridge qbx and not qb? be the solution? Bridge ox_inv

Alternative solutions

No response

Additional context

No response

@Mesrine67 Mesrine67 added the enhancement New feature or request label Jun 6, 2024
@qbox-duck qbox-duck bot added this to Issues Jun 6, 2024
@github-project-automation github-project-automation bot moved this to Todo in Issues Jun 6, 2024
@Mesrine67
Copy link
Contributor Author

and delete exports.qbx_core:CreateUseableItem to use exports like the examples provided here? exemple ox_inv

and supply the items to be added to the ox_inv list

@Mesrine67
Copy link
Contributor Author

exemple lockpick

['lockpick'] = {
    label = 'Lockpick',
    weight = 5, 
    close = true,
    server = {
        export = 'qbx_smallresources.lockpick'
    }
}
exports('lockpick', function(event, item, inventory, slot, data)
    if event == 'usedItem' then
        local isAdvanced = item.metadata and item.metadata.advanced or false
        if isAdvanced then
            TriggerClientEvent('lockpicks:UseLockpick', inventory.id, true)
            TriggerEvent('lockpicks:UseLockpick', inventory.id, true)
        else
            TriggerClientEvent('lockpicks:UseLockpick', inventory.id, false)
            TriggerEvent('lockpicks:UseLockpick', inventory.id, false)
        end
        return TriggerClientEvent('ox_lib:notify', inventory.id, {
            type = 'success',
            description = isAdvanced and 'Using advanced lockpick' or 'Using standard lockpick'
        })
    end
end)

@Mesrine67
Copy link
Contributor Author

exemple drugs items

['joint'] = {
		label = 'Joint',
		weight = 50,
		stack = true,
		consume = 1,
		description = 'Un joint roulé pour se détendre ou faire la fête.',
		client = {
			event = 'consumables:client:UseJoint'
		}
	},

	['cokebaggy'] = {
		label = 'Sachet de Coke',
		weight = 10,
		stack = true,
		consume = 1,
		description = 'Un petit sachet de cocaïne.',
		client = {
			event = 'consumables:client:Cokebaggy'
		}
	},

	['crack_baggy'] = {
		label = 'Sachet de Crack',
		weight = 10,
		stack = true,
		consume = 1,
		description = 'Un petit sachet de crack.',
		client = {
			event = 'consumables:client:Crackbaggy'
		}
	},

	['xtcbaggy'] = {
		label = 'Sachet d\'Ecstasy',
		weight = 10,
		stack = true,
		consume = 1,
		description = 'Un petit sachet d\'ecstasy.',
		client = {
			event = 'consumables:client:EcstasyBaggy'
		}
	},

	['oxy'] = {
		label = 'Oxycontin',
		weight = 5,
		stack = true,
		consume = 1,
		description = 'Un puissant antidouleur opioïde.',
		client = {
			event = 'consumables:client:oxy'
		}
	},

	['meth'] = {
		label = 'Meth',
		weight = 10,
		stack = true,
		consume = 1,
		description = 'Un petit sachet de méthamphétamine.',
		client = {
			event = 'consumables:client:meth'
		}
	},
	```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant