Merge pull request #1088 from Gellipapa/main

✏️ fix(es_extended/functions.lua) handle args.playerId is nil
This commit is contained in:
Gellipapa
2023-06-28 02:05:15 +02:00
committed by GitHub
+4
View File
@@ -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))