Skip to content

Commit 1b210e1

Browse files
feat: optional playerId of givekeys command (#63)
1 parent 1fabd0b commit 1b210e1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

server/commands.lua

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ lib.addCommand(locale('addcom.givekeys'), {
1818
name = locale('addcom.givekeys_id'),
1919
type = 'playerId',
2020
help = locale('addcom.givekeys_id_help'),
21+
optional = true
2122
},
2223
{
2324
name = locale('addcom.givekeys_plate'),
@@ -29,10 +30,6 @@ lib.addCommand(locale('addcom.givekeys'), {
2930
restricted = false,
3031
}, function (source, args)
3132
local id = args[locale('addcom.givekeys_id')]
32-
if id and not exports.qbx_core:GetPlayer(id) then
33-
return exports.qbx_core:Notify(source, locale('notify.player_offline'), 'error')
34-
end
35-
3633
TriggerClientEvent('qb-vehiclekeys:client:GiveKeys', source, id, args[locale('addcom.givekeys_plate')])
3734
end)
3835

0 commit comments

Comments
 (0)