Skip to content

Commit

Permalink
tweak(server/commands): add error notification types
Browse files Browse the repository at this point in the history
  • Loading branch information
BerkieBb committed May 11, 2024
1 parent c27d17d commit d30410a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lib.addCommand('givekeys', {
}, function (source, args)
local id = args[locale('addcom.givekeys_id')]
if id and not exports.qbx_core:GetPlayer(id) then
exports.qbx_core:Notify(source, locale('notify.player_offline'))
exports.qbx_core:Notify(source, locale('notify.player_offline'), 'error')
return
end

Expand All @@ -45,9 +45,9 @@ lib.addCommand('addkeys', {
local plate = args[locale('addcom.addkeys_plate')]
local success = GiveKeys(id, plate)
if success then
exports.qbx_core:Notify(source, locale('notify.added_keys', plate, id))
exports.qbx_core:Notify(source, locale('notify.added_keys', plate, id), 'success')
else
exports.qbx_core:Notify(source, locale('notify.player_offline'))
exports.qbx_core:Notify(source, locale('notify.player_offline'), 'error')
end
end)

Expand All @@ -71,8 +71,8 @@ lib.addCommand('removekeys', {
local plate = args[locale('addcom.removekeys_plate')]
local success = RemoveKeys(id, plate)
if success then
exports.qbx_core:Notify(source, locale('notify.removed_keys', plate, id))
exports.qbx_core:Notify(source, locale('notify.removed_keys', plate, id), 'success')
else
exports.qbx_core:Notify(source, locale('notify.player_offline'))
exports.qbx_core:Notify(source, locale('notify.player_offline'), 'error')
end
end)

0 comments on commit d30410a

Please sign in to comment.