esx_society
Need help.
Ok, so i am adding in a callsign option to esx_society but i am currently stuck at how to input the callsign to the database using esx_menu_dialog. Click on callsign then the esx_menu_dialog appears and imput whatever callsign and it saves to the database.
Client side
if data.value == 'callsign' then
ESX.UI.Menu.Open(
'dialog', GetCurrentResourceName(), 'callsign_',
{
title = _U('callsign')
},
function(data, menu)
local args = callsign
if args == nil then
exports['mythic_notify']:DoCustomHudText('inform', 'Invalid Callsign')
else
menu.close()
OpenEmployeeList(society)
TriggerServerEvent('esx_society:setCallsign', callsign)
end
end,
function(data, menu)
menu.close()
OpenEmployeeList(society)
end
)
end
-- Server Side…
RegisterServerEvent('esx_society:setCallsign') AddEventHandler('esx_society:setCallsign', function(source, args) local argString = table.concat(args, " ") MySQL.Async.execute('UPDATE users SET callsign = @callsign WHERE identifier = @source',{ ['@callsign'] = argString, ["@source"] = GetPlayerIdentifiers(source)[1] },
function(rowsChanged)
TriggerClientEvent("output", source, "^2".. argString.. "^0")
end)
end)
been at this all day and night but can’t seem to get it triggered.
Any help would be highly grateful

