From f2671b0ab6574467012572e814d944e3b76088bb Mon Sep 17 00:00:00 2001 From: Mycroft Date: Mon, 18 Jul 2022 13:36:20 +0100 Subject: [PATCH] fix: identity - show notification that input is wrong --- [esx]/esx_identity/server/main.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/[esx]/esx_identity/server/main.lua b/[esx]/esx_identity/server/main.lua index af984dd8..6b01cf31 100644 --- a/[esx]/esx_identity/server/main.lua +++ b/[esx]/esx_identity/server/main.lua @@ -71,6 +71,7 @@ if Config.UseDeferrals then deferrals.done() else + deferrals.done(_U('invalid_format')) end end @@ -220,6 +221,7 @@ elseif not Config.UseDeferrals then playerIdentity[xPlayer.identifier] = nil cb(true) else + xPlayer.showNotification(_U('invalid_format'), "error") cb(false) end else @@ -230,6 +232,8 @@ elseif not Config.UseDeferrals then checkSexFormat(data.sex) and checkDOBFormat(data.dateofbirth) and checkHeightFormat(data.height) then TriggerEvent('esx_identity:completedRegistration', source, data) cb(true) + else + TriggerClientEvent("esx:showNotification", source, _U('data_incorrect'), "error") end end end)