mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
Merge pull request #1088 from Gellipapa/main
✏️ fix(es_extended/functions.lua) handle args.playerId is nil
This commit is contained in:
@@ -131,6 +131,10 @@ function ESX.RegisterCommand(name, group, cb, allowConsole, suggestion)
|
||||
xPlayer.showNotification(error)
|
||||
end
|
||||
else
|
||||
if ESX.Table.SizeOf(args) == 0 then
|
||||
xPlayer.showNotification(TranslateCap('commanderror_invalidplayerid'))
|
||||
return
|
||||
end
|
||||
cb(xPlayer or false, args, function(msg)
|
||||
if playerId == 0 then
|
||||
print(('[^3WARNING^7] %s^7'):format(msg))
|
||||
|
||||
Reference in New Issue
Block a user