PS-MDT

Q: Why is MDT not opening when I do /mdt or press K?

A: You have not installed the SQL that comes with it.

Your MDT has a script error and is not loading properly. Restart the server and watch for server and client sided errors.

Q: Error: No such export "..." for in resource ps-dispatch

A: You have not properly started ps-dispatch. Make sure the resource name is ps-dispatch.

Q: Why am I getting error the following error? "SCRIPT ERROR in promise (unhandled): Error: ps-mdt was unable to execute a query!" A: You did not installed the SQL properly. Make sure that you install the required SQL found inside of ps-mdt. If you are missing a single table, then add each table you're missing individually.

Q: How do I add Charges to a criminal in an incident? A: After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge"

Q: Why is my Rooster is empty? A: Go to shared>config.lua. You need to add a Google Sheet link to your Config.RosterLink. We have released a few free Rosters in our Discord, check the #free-release channel.

Q: I'm getting SQL Error "All parts of PRIMARY KEY must not be NUL;..." A: First, start adding tables one by one until you get to the table that has the error, leave that one for last and add all the other ones. It will most likely be mdt_data. Instead, use this table. CREATE TABLE IF NOT EXISTS `mdt_data` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cid` VARCHAR(20) DEFAULT NULL, `information` MEDIUMTEXT DEFAULT NULL, `tags` TEXT NOT NULL, `gallery` TEXT NOT NULL, `jobtype` VARCHAR(25) DEFAULT 'police', `pfp` TEXT DEFAULT NULL, `fingerprint` VARCHAR(50) DEFAULT NULL, UNIQUE KEY (`cid`), PRIMARY KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Q: I added new departments and they can only view the mdt, not edit them. Why is that? A: You need to add them to the const PoliceJobs list found on ps-mdt> ui > app.js. Example:

const PoliceJobs = {
  ['upd']: true,
  ['sasp']: true,
  ['police']: true,
  ['bcso']: true,
  ['doc']: true,
}

Q: Why do all the cops say LSPD as their rank? A: You first need to make sure you have the done the FAQ above. After you have added the proper PoliceJobs field. Go to ps-mdt > ui > app.js Find if (PoliceJobs[unit.unitType] !== undefined) { Add the jobs you want on there, for example if you want to add BCSO.

Example:

if (PoliceJobs[unit.unitType] !== undefined) {
          policeCount++;
          if (unit.unitType == "upd") {
            activeInfoJob = `<div class="unit-job active-info-job-upd">U.P.D.</div>`;
          } else if (unit.unitType == "sasp") {
            activeInfoJob = `<div class="unit-job active-info-job-sahp">S.A.H.P.</div>`;
          } else if (unit.unitType == "lspd") {
            activeInfoJob = `<div class="unit-job active-info-job-lspd">L.S.P.D.</div>`;
          } else if (unit.unitType == "bcso") {
            activeInfoJob = `<div class="unit-job active-info-job-bcso">B.C.S.O.</div>`;
          } else if (unit.unitType == "doc") {
            activeInfoJob = `<div class="unit-job active-info-job-doc">D.O.C.</div>`;
          }
        }

Q: Why am I getting error "No such export GetCoreObject in resources qb-core." A: Make sure ps-mdt is ensured after qb-core. Also ensure you're using the latest qb-core.

Q: Why am I getting this error? FUNCTION s436_CSRP.JSON_VALUE does not exist A: Make sure you're using the latest MYSQL version and change the JSON_VALUE in the script to JSON_EXTRACT.

Q: How do I add charges to a criminal in an Incident?

A: After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge".

Q: My calls aren't being populated?

A: You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that.

Q: How do I add more license types? A: You can find your answer in this tutorial https://forum.cfx.re/t/project-sloth-mdt-how-to-add-licenses-ps-mdt/5024049 Which a member of our community has written! Thanks: BigSmash!

Last updated