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

incorrect variable in clearevidence command #1554

Closed
lush0n3 opened this issue Dec 13, 2023 · 0 comments
Closed

incorrect variable in clearevidence command #1554

lush0n3 opened this issue Dec 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@lush0n3
Copy link

lush0n3 commented Dec 13, 2023

Describe the bug
The variable to remove evidence is incorrect and therefore does not work.

Framework
All

Resource version
v2.37.2

To Reproduce
Line 533 in ox_inventory/server.lua

lib.addCommand('clearevidence', {
	help = 'Clears a police evidence locker with the given id',
	params = {
		{ name = 'locker', type = 'number', help = 'The locker id to clear' },
	},
}, function(source, args)
	if not server.isPlayerBoss then return end

	local inventory = Inventory(source)
	local group, grade = server.hasGroup(inventory, shared.police)
	local hasPermission = group and server.isPlayerBoss(source, group, grade)

	if hasPermission then
		MySQL.query('DELETE FROM ox_inventory WHERE name = ?', {('evidence-%s'):format(args.evidence)})  -- LINE 533 CHANGE args.evidence for args.locker
	end
end)
@lush0n3 lush0n3 added the bug Something isn't working label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant