If you are going to send the email to grant a level, you can use this code.
-- Level mail example-- Client sideTriggerServerEvent('wert-blackmarket:server:level-mail')-- If you want create a addon code for the add level-- Server side codeRegisterNetEvent('exampleaddlevelwertblackmarket', function()local src = sourcelocal ply = QBCore.Functions.GetPlayer(src)ifnot ply thenreturnend ply.Functions.SetMetaData("wertblackmarketlevel", 100) -- 100 Example level if you want change your thinkend)
CLIENT EXPORTS
-- Checked phone open state (boolean)local blackmarketphoneopenstate = exports['wert-blackmarket']:PhoneOpen()if blackmarketphoneopenstate then-- return : trueprint("Phone open")else-- return : falseprint("Phone close")end
-- Get illegal doctors tablelocal illegaldoctors = exports['wert-blackmarket']:illegaldoctors()for k,v inpairs(illegaldoctors) doif v thenlocal id = klocal doctornpc = v.npclocal level = v.seviyeprint(id, doctornpc, level)endend
SERVER EXPORTS
-- All accounts dataslocal allusers = exports['wert-blackmarket']:GetAllAccounts()for k,v inpairs(allusers) doif v thenlocal output = { citizenid = v.citizenid, password = v.password, accountid = v.accountid, mail = v.mail }endend
-- All accounts wallet datalocal allwallets = exports['wert-blackmarket']:GetAllWalletData()for k,v inpairs(allwallets) doif v thenlocal output = { accountid = k, money =tonumber(v.money), history = v.history }endend
-- Find player citizenid from accountidlocal targetcitizenid = exports['wert-blackmarket']:FindPhoneAccountByCitizenid(accountid)if targetcitizenid thenprint(targetcitizenid) -- Citizenid end