QBCore - Ps-MDT | Install & Showcase | FiveM Tutorial 2023
ฝัง
- เผยแพร่เมื่อ 7 ก.ย. 2024
- Today's video covers the install and showcase of ps-mdt, a resource created by Project Sloth. Some features require a radar resource created by WolfKnight98 which is down below. I hope you enjoy the video. I reuploaded this and corrected the error. Weapons will automatically register when bought from ammunation
LINKS:
Ps-Mdt Resource - github.com/Pro...
Ps-Dispatch Install Video - • QBCore - PS- Dispatch ...
WolfKnight Radar - github.com/Wol...
Discord - / discord
SNIPPETS:
WEAPON SELF REGISTER SNIPPET:
Go to your qb-target - init.lua and go to "Config.CircleZones" and paste this in.
["weapReg"] = {
name = "registerWeapon",
coords = vector3(440.61, -981.13, 30.69),
radius = 2.5,
debugPoly = false,
options = {
{
num = 1,
type = "client",
event = "ps-mdt:client:selfregister",
icon = 'fa-solid fa-check', -- This is the icon that will display next to this trigger option
label = 'Register your Weapon',
targeticon = 'fa-solid fa-gun',
}
},
distance = 2.5,
},
RADIAL MENU SNIPPET:
id = 'trafficstop',
title = 'Traffic Stop Alert',
icon = 'user-lock',
type = 'client',
event = 'ps-mdt:client:trafficStop',
shouldClose = true
}, {
Great vid! The only problem i had was replacing line 2112-2148. it messed my inventory up to where i could not pull out hand cuffs from the armory, along with other inventory issues. I had to revert to the back-up lua file for now. Both this vid and the ps-dispatch video you did helped me out a TON, THANK YOU
The numbers could be different for you. Just find the original event and replace it with the snippet they provided in the readme
@@kamarynkamaryn will do thanks again for your help and response 👍
as of the Nov 2023- i think its line 2121 - 2143 or something like that. Youll see a section that starts with the same piece, and then ends right before "else if player. functions.removemoney('cash', price, "unknown-itemshop-bought-item') then ...
You need to make an updated version of this. The inventory is different with the app.js file. So other people who are installing this that do not want to use the ps-inventory or they just want to use the default qb-inventory. I figured out how to do it. Other people might have a problem with that.
how you figure it out using qb inventory?
@WayneRigney what's the steps for ox_inventory
Yo
your amazing your slow at explaining things and ive been trying to learn how to install scripts and mlos thank you for this video just created my new server
Your the Best bro, it works perfectly...Thanks a Million💯👍👍
Friend, I don't get the alert when I press traffic stop, neither for me nor for my colleagues. I have the latest version of MDT
Make sure you have the plate reader on and the radar
thank you very much I just started and I'm with a server and you help me a lot you are a great by the way we see you from spain jejej
Can you explain how to install thefts, such as a jewelry robbery and a bank Robbery And Thanks Bro 🔥
good video, u have any info on how to add a profile pic in the mdt ? i tried alot of things but most didnt work
I followed the steps in the video exactly how you did, but now whenever I join the server I get nothing but a black screen
something to do with your qb-target
cannot find the markedbills sections thats in the video it is completely different what do i do?
did as you said and in the app.js. Should be somewhere around markedbills i dont see markedbills
@@solo_la_fam That code was removed in one of the inventory updates. Its been gone for a while
So followed all the steps everything is up to date some parts i use ox inventory and then switched to ps inventory, most of it works well. However my cameras dont go to the location it just closes out my table and mdt screen, i cannot register and weapons so im kinda stuck
is there anyway you could show how to add extra notifications for things like vehicle boosting and boii-drug selling calls
my mdt doenst even open? but at my tx it says that its started /mdt doenst working
you ever got this working?
Not sure which PS video to ask this under, because of trhe way it might be scripted = Do the traffic cameras, when issuing fines - does it create an entry in sql? My goal is to have all fines logged to player table either for cummulative, or as rows, or a table for mod, that brings in player name. Or is this something that ties only to car and not player? My objective is being able to export reports from sql- one of them being ongoing traacking of total fines paid by all players.
I'm new to all of this how do I do the sql like where you use the hs app I don't have that?
trying to find this out myself
@@Bmore4710 I know this is a long time ago but I found out how if you need help still
@@CalebGaming2595 I was actually just looking for how to do this lol. I am using xampp for my SQL so I don't know how heidi_sql works into this
Is it possible to see other on duty officers on map? Can't find the option anywhere in the config.
I did everything and even the updated fixes. After character selection its just a black loading screen.
thats what i had and i had to reset server
how do you enable third party cookies for the Roster and SOPs ???
Hey bro so i seen that you have the sign on and off duty for the police. Is that a different script or do I setup that through this script?
I can only edit finger print / image on profiles. Anyone know why?
For the registration part, Do i have to put it in? Because i want it so only police can register weapons.
when i select my person it then sends me to a black loading screen
Me too did u fix it?
How to active department unit like BCSO and anything?
I am getting an error when trying to search someone in the MDT, Can you help?
When I try to go on duty as a police officer and I click e it doesn’t do anything I just stay off duty
i dont have the markedbills...what do i do then?
thank you
😍🥰🥰🥰🥰
@kamaryn after I went through the whole process no I just get a long black screen and loading icon and it doesn't actually load into the game and I get an error message on the live code that says it has something to do with MDT
I did notice that when I was cutting and pasting a large chunk of code from the GitHub that you pointed out and noticed that I guess it's maybe cuz I have a newer version and you're working on the older version but there's a large section of code that looks like it had been updated and it was slightly different than what I saw on the video when you were showing us I think my problem might be in there but I have to re-watch the video and recheck the code
@@frankie-_-amazon The inventory edit part will be different bc of qbcore updates
@@kamarynkamaryn thanks I'm going to try to see if I can take care of it tonight I love your videos by the way keep up the good work
@@frankie-_-amazon Thank you :)
for some reason i have tried installing this 5 times, following your instructions and every time i select my character to load i get a black loading screen
same here
i cant find else if marked bills on app file pleaase help
Any way to change the size of the MDT screen?
This tutorial is unfortunately outdated. Especially when it comes to the citation part.
Well it was made 8 months ago there have been many changes
Right. They gotta create an updated installation unfortunately. Hopefully soon. You can always have your fingers crossed lol.
Hello my favourite youtuber ;)
Hello there
It doesn't worked for me :( Could you please help me somehow
I dont have a marked money in mine. HELPPPP
Can you show us how to add and stream custom clothing pack
Eup? I am very familiar in that dept if u need help still
when i do jail is doesnt send them to jail
Hello , can I delete the incidents after ?
sql import error
Will this work for ox_inventory ?
Yes
For some reason when i pick my character it black screens right after, with a white circle at the buttom right?? Any fix>?
Do u have any errors? It also could be u did the inventory portion wrong
@@kamarynkamaryn No errors when i hit f8 the line starts blinking very fast.
yeah i got the same no error or anything had to restore from my backup
@@Salty_Kingston how do you restore from backup
Same thing happened to me now ive removed the resource and removed it from t server.fg and its still giving me the blank screen.
Does community service work??
what software do i use to run sql
HeidiSQL is a good option, phpmysql is another option too.
jailing is scuffed
In the readme they tell you what to do if its messed up
10:13 grant license not working man.
Which license is it? If its the weapon license u have to be a certain grade
i dont know man my qb-inventory main looks very diferent
RegisterNetEvent('qb-inventory:server:SetInventoryData', function(fromInventory, toInventory, fromSlot, toSlot, fromAmount, toAmount)
if not fromInventory or not toInventory or not fromSlot or not toSlot or not fromAmount or not toAmount then return end
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
fromSlot, toSlot, fromAmount, toAmount = tonumber(fromSlot), tonumber(toSlot), tonumber(fromAmount), tonumber(toAmount)
local fromItem = getItem(fromInventory, src, fromSlot)
local toItem = getItem(toInventory, src, toSlot)
if fromItem then
if not toItem and toAmount > fromItem.amount then return end
if fromInventory == 'player' and toInventory ~= 'player' then checkWeapon(src, fromItem) end
local fromId = getIdentifier(fromInventory, src)
local toId = getIdentifier(toInventory, src)
if toItem and fromItem.name == toItem.name then
if RemoveItem(fromId, fromItem.name, toAmount, fromSlot, 'stacked item') then
AddItem(toId, toItem.name, toAmount, toSlot, toItem.info, 'stacked item')
end
elseif not toItem and toAmount < fromAmount then
if RemoveItem(fromId, fromItem.name, toAmount, fromSlot, 'split item') then
AddItem(toId, fromItem.name, toAmount, toSlot, fromItem.info, 'split item')
end
else
if toItem then
if RemoveItem(fromId, fromItem.name, fromAmount, fromSlot, 'swapped item') and RemoveItem(toId, toItem.name, toAmount, toSlot, 'swapped item') then
AddItem(toId, fromItem.name, fromAmount, toSlot, fromItem.info, 'swapped item')
AddItem(fromId, toItem.name, toAmount, fromSlot, toItem.info, 'swapped item')
end
else
if RemoveItem(fromId, fromItem.name, toAmount, fromSlot, 'moved item') then
AddItem(toId, fromItem.name, toAmount, toSlot, fromItem.info, 'moved item')
end
end
end
end
end)
Video came out a while ago. Qb has made updates since then especially if you are using the newest version
so i get an script error: ps-mdt/client/main.lua:95 attempt to call a nil value (global 'GetJobType') any idea how to fix it
You may need to specify which job it needs to work with.
i get this error after installation:
@qb-core/esrver/player.lua:188: No such export LoadInventory in resource qb-inventory
getting same error
same for community service
Find - Line 88 -- Metadata -- Under the function - paste below.
PlayerData.metadata = PlayerData.metadata or {} PlayerData.metadata["communityservice"] = PlayerData.metadata["communityservice"] or 0 end
this is line 80 to 92
local function applyDefaults(playerData, defaults)
for key, value in pairs(defaults) do
if type(value) == 'function' then
playerData[key] = playerData[key] or value()
elseif type(value) == 'table' then
playerData[key] = playerData[key] or {}
applyDefaults(playerData[key], value)
else
playerData[key] = playerData[key] or value
end
end
end
config.MugshotWebhook
config.clockinwebhook no code