General setup is quite easy, delete your OLD qb-phone if you server havent been running previously then go ahead and run the provided SQL file in your database.
If your server has been running qb-phone previously please update your sql while being carefull and take a backup so you have no data lost.
After the SQL setup you can now drop the resource into your server and start it up while you conduct the next steps.
Setting up employment and multijob can be quite tricky so make sure to reread this if you have any issues... If you already have a multijob system and you do not wish to use this then you can skip this step.
local FirstStart = true
Start the script and make sure it's fully done, it can take a while depending on your current playerbase (ensure qb-phone in console or f8)
Head over to qb-phone/server/employment.lua again and change the FirstStart to false
Like so:
local FirstStart = false
replace the commands with the code below:
QBCore.Commands.Add('setjob', 'Set A Players Job (Admin Only)', { { name = 'id', help = 'Player ID' }, { name = 'job', help = 'Job name' }, { name = 'grade', help = 'Grade' } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
local job = tostring(args[2])
local grade = tonumber(args[3])
local sgrade = tostring(args[3])
local jobInfo = QBCore.Shared.Jobs[job]
if jobInfo then
if jobInfo["grades"][sgrade] then
Player.Functions.SetJob(job, grade)
exports['qb-phone']:hireUser(job, Player.PlayerData.citizenid, grade)
else
TriggerClientEvent('QBCore:Notify', source, "Not a valid grade", 'error')
end
else
TriggerClientEvent('QBCore:Notify', source, "Not a valid job", 'error')
end
else
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
end
end, 'admin')
QBCore.Commands.Add('removejob', 'Removes A Players Job (Admin Only)', { { name = 'id', help = 'Player ID' }, { name = 'job', help = 'Job name' } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
if Player.PlayerData.job.name == tostring(args[2]) then
Player.Functions.SetJob("unemployed", 0)
end
exports['qb-phone']:fireUser(tostring(args[2]), Player.PlayerData.citizenid)
else
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
end
end, 'admin')
RegisterNetEvent('qb-cityhall:server:ApplyJob', function(job, cityhallCoords)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
local ped = GetPlayerPed(src)
local pedCoords = GetEntityCoords(ped)
local JobInfo = QBCore.Shared.Jobs[job]
if #(pedCoords - cityhallCoords) >= 20.0 or not availableJobs[job] then
return DropPlayer(source, "Attempted exploit abuse")
end
Player.Functions.SetJob(job, 0)
exports['qb-phone']:hireUser(job, Player.PlayerData.citizenid, 0)
TriggerClientEvent('QBCore:Notify', src, Lang:t('info.new_job', {job = JobInfo.label}))
end)
It should now look like this
Code to be pasted
PlayerData.metadata['crypto'] = PlayerData.metadata['crypto'] or {
["shung"] = 0,
["gne"] = 0,
["xcoin"] = 0,
["lme"] = 0
}
It should now all look like this:
This is pretty much everything to do with setting up the phone. If you encounter any issues please open a issue tab here on Github and I will try to fix them asap.
Made the original phone ages ago and it was ok ish so shoutout to them IG
He cured my boredom over at twitch.tv/kakarotqb
Sold a $50 CSS and JS edit pretty poggers
Reuploaded a $50 CSS and JS edit even more poggers