Merge pull request #1222 from aysihuniks/main

feat(commands): add pre-execution middleware event
This commit is contained in:
Kakarot
2026-06-17 13:04:52 -05:00
committed by GitHub
+4
View File
@@ -28,6 +28,10 @@ function QBCore.Commands.Add(name, help, arguments, argsrequired, callback, perm
args = { 'System', Lang:t('error.missing_args2') } args = { 'System', Lang:t('error.missing_args2') }
}) })
end end
TriggerEvent('QBCore:Server:PreCommandExecution', source, name, args, rawCommand)
if WasEventCanceled() then return end
callback(source, args, rawCommand) callback(source, args, rawCommand)
end, restricted) end, restricted)