Hey guys!
I finally got to grips with QB Core. And I have to say I love it!
Accordingly, my Emergencyphone is now also available for QB-Core!
I am happy about feedback and improvement suggestions!
More scripts for QB-Core will come
(I also hope this post is okay)
The ESX-Version can be found on the end of the post!
This script is used to have a control center (emergency phones) for different fractions.
So LSPD can be reached via 911 for example.
- Add or remove new emergency phones
- Take emergency phone
- Changes your number to the configurated number in the config
- Give emergency phone back
- Gives you normal number back
- Phone resets on player leave/quit or player death
- Messages to all player
- You can add as many messages as you want for each job
- OnDuty list of the employees in the job
- Message the player directly
- Messages when an employee enters or leaves the service
- Messages when an employee takes over or returns the control station
- qb-phone
- ChezzaPhone
- High Phone
- GKS-Phone
- RoadPhone
- Quasar-Smartphone
Language support
- german
- english
Of course you can also add your own language in the configuration!
I did not make a new video for the QB core version.
If you still want one, just let me know. Is no problem!
Showcase Video
New Showcase Video! (18.01.2022)
Pictures
Config
Config = {}
---------------------------------------------------------
-- --
-- Important options --
-- --
---------------------------------------------------------
Config.Locale = 'de'
Config.checkVersion = true
---------------------------------------------------------
-- --
-- Menu Open Options --
-- --
---------------------------------------------------------
-- enables command to open menu
Config.Command = true
-- commandname to open menu
Config.CommandName = "ephone"
-- enables key to open menu
Config.enableKeyUsage = false
-- key to open menu -> default (314) NUM +
Config.Key = 314
-----------------------------------------------------------------
-- --
-- Framework and SQL options --
-- --
-----------------------------------------------------------------
Config.numberDB = 'phone_numbers' --table for additional phonenumber
Config.NumberTable = 'phone_number'
-- Most important options lol
-- 'qbphone', 'chezza', 'gksphone', 'highphone', 'roadphone', 'quasar'
Config.Phone = 'qbphone'
-----------------------------------------------------------------
-- --
-- Some additional options --
-- --
-----------------------------------------------------------------
-- Use onDutyList in menu or not
Config.onDutyList = true
-- Message options
Config.returnMessageOnDeath = false
Config.noPhoneForJob = false
Config.OnDutyMessage = true
Config.OffDutyMessage = true
Config.TakePhoneMessage = true
Config.ReturnPhoneMessage = true
Config.ResetPhoneMessage = true
-----------------------------------------------------------------
-- --
-- Shared functions to edit --
-- --
-----------------------------------------------------------------
-- implement your own notify system
-- Client notification option
Config.sendClientNotify = function(header, msg, time, type)
TriggerEvent('QBCore:Notify', msg, "primary", time or 2000)
end
-- Job messages notification system
-- Server notification system
Config.sendServerNotify = function(src, header, subtitle, msg)
TriggerClientEvent('QBCore:Notify', src, msg)
end
-- Simple Debug function
Config.useDebug = true
Config.debug = function(msg)
if Config.debug then
print("[Debug] " .. msg)
end
end
--------------------------------------------------------
-- --
-- Webhook options --
-- --
--------------------------------------------------------
Config.webhookOptions = {
-- Set it to nil to disable webhooks
webhook = nil,
botColor = "6205745",
botName = "gpScripts",
LogTakeAction = true,
LogReturnAction = true,
LogResetAction = true,
LogMessageAction = true,
}
-----------------------------------------------------------------------------
-- --
-- Configurated Jobs for control center --
-- --
-----------------------------------------------------------------------------
Config.Jobs = {
["police"] = { -- jobname
lable = "LSPD", -- joblabel for database
number = "911", -- job number
takeGrade = 4, -- from this rank you can take the center
returnGrade = 4, -- from this rank you can return the center
resetGrade = 4, -- from this rank you can reset the center
messageGrade = 4, -- from this rank you send messages
takeFunction = true, -- if the job should have the phone options
messageFunction = true, -- if the job should have the message options
onlyOnDuty = true, -- only allow the usage of the menu on onDuty
messages = {
[1] = {
menuText = "Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist erreichbar",
msg = "Sie sind in Not? Das LSPD kann nun über 911 erreicht werden!",
},
[2] = {
menuText = "Pause-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Das LSPD macht Pause! Leitstellentelefon zur Zeit nicht besetzt!",
},
[3] = {
menuText = "Außerdienst-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Das LSPD geht in den Feierabend! Leitstellentelefon zur Zeit nicht besetzt!",
},
}
},
["ambulance"] = {
lable = "LSMD",
number = "912",
takeGrade = 1,
returnGrade = 4,
resetGrade = 4,
messageGrade = 3,
takeFunction = true,
messageFunction = true,
messages = {
[1] = {
menuText = "Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist erreichbar",
msg = "Sie benötigen medizinische Hilfe? Das LSMD ist unter 912 erreichbar!",
},
[2] = {
menuText = "Pause-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Das LSMD macht Pause! ~r~Leitstellentelefon~s~ zur Zeit ~r~nicht besetzt!",
},
[3] = {
menuText = "Außerdienst-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Das LSMD geht in den Feierabend! ~r~Leitstellentelefon~s~ zur Zeit ~r~nicht besetzt!",
}
}
},
["mechanic"] = {
lable = "Mechanic",
number = "913",
takeGrade = 1,
returnGrade = 4,
resetGrade = 4,
messageGrade = 3,
takeFunction = true,
messageFunction = true,
messages = {
[1] = {
menuText = "Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist erreichbar",
msg = "Wir sind für Sie im Dienst! ACLS kann nun über 913 erreicht werden!",
},
[2] = {
menuText = "Pause-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "ACLS macht nun Pause! ~r~Leitstellentelefon~s~ zur Zeit ~r~nicht besetzt!",
},
[3] = {
menuText = "Außerdienst-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "ACLS geht in den Feierabend! ~r~Leitstellentelefon~s~ zur Zeit ~r~nicht besetzt!",
}
}
},
["cardealer"] = {
lable = "Cardealer",
number = "915",
takeGrade = 1,
returnGrade = 4,
resetGrade = 4,
messageGrade = 3,
takeFunction = true,
messageFunction = true,
messages = {
[1] = {
menuText = "Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist erreichbar",
msg = "Sie haben zu viel Geld? Gönnen Sie sich ein bisschen Luxus: 915!",
},
[2] = {
menuText = "Pause-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Das Luxusautohaus macht Pause! ~r~Leitstellentelefon~s~ zur Zeit ~r~nicht besetzt!",
},
[3] = {
menuText = "Außerdienst-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Das Luxusautohaus geht in den Feierabend! ~r~Leitstellentelefon~s~ zur Zeit ~r~nicht besetzt!",
}
}
},
["unicorn"] = {
lable = "Unicorn",
number = "69",
takeGrade = 1,
returnGrade = 4,
resetGrade = 4,
messageGrade = 3,
takeFunction = true,
messageFunction = true,
messages = {
[1] = {
menuText = "Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist erreichbar",
msg = "~b~Cool~s~ drinks and ~r~hot~s~ girls! Das Unicorn lässt es heute krachen!",
},
[2] = {
menuText = "Pause-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Unsere Girls brauchen eine Pause!\nDu auch? ~b~Dann komm vorbei!",
},
[3] = {
menuText = "Außerdienst-Mitteilung an Bürger schicken",
menuSubtitle = "Leitstelle ist nicht erreichbar",
msg = "Das Unicorn schließt seine Türen!\n~b~Bis zum nächsten Mal!",
}
}
}
}
- any of the phone mention above
- QB-Core
- NativeUILua
Check my other scripts out:
[ESX] Emergencyphone
[ESX] Visasystem/Visumsystem
[ESX] Business Cards
[ESX] RandomDealer
[ESX] Change phone number
[ESX] noHUD
[ESX] gp_vehicleTracker - Easy Vehicle Tracker!
Code is accessible | Yes/No |
Subscription-based | No |
Lines (approximately) | ~600 |
Requirements | Phone (mentioned above), QB-Core, NativeUI |
Support | Yes |