MDT Compatibility
ps-mdt
1
View the code on GitHub: ps-mdt/server/main.lua
REPLACE the code exactly as seen in the screenshot below.
local dispatchResources = {
{ name = 'ps-dispatch', export = 'GetDispatchCalls' },
{ name = 'cd_dispatch3d', export = 'GetDispatchCalls_PS' },
{ name = 'cd_dispatch', export = 'GetDispatchCalls_PS' },
}
for _, res in ipairs(dispatchResources) do
if GetResourceState(res.name) == 'started' then
return exports[res.name][res.export]()
end
end
2
View the code on GitHub: ps-mdt/server/main.lua
REPLACE the code exactly as seen in the screenshot below.
local dispatchResources = {
{ name = 'ps-dispatch', export = 'GetDispatchCalls' },
{ name = 'cd_dispatch3d', export = 'GetDispatchCalls_PS' },
{ name = 'cd_dispatch', export = 'GetDispatchCalls_PS' },
}
for _, res in ipairs(dispatchResources) do
if GetResourceState(res.name) == 'started' then
calls = exports[res.name][res.export]()
break
end
end
3
View the code on GitHub: ps-mdt/server/main.lua
REPLACE the code exactly as seen in the screenshot below.
local dispatchResources = {
{ name = 'ps-dispatch', export = 'GetDispatchCalls' },
{ name = 'cd_dispatch3d', export = 'GetDispatchCalls_PS' },
{ name = 'cd_dispatch', export = 'GetDispatchCalls_PS' },
}
for _, res in ipairs(dispatchResources) do
if GetResourceState(res.name) == 'started' then
cb(exports[res.name][res.export]())
break
end
end
4
View the code on GitHub: ps-mdt/client/main.lua
REPLACE the code exactly as seen in the screenshot below.
CreateThread(function()
local dispatchResources = {
{ name = 'ps-dispatch' },
{ name = 'cd_dispatch3d' },
{ name = 'cd_dispatch' },
}
for _, res in ipairs(dispatchResources) do
if GetResourceState(res.name) == 'started' then
TriggerServerEvent("ps-mdt:dispatchStatus", true)
break
end
end
end)
Last updated
Was this helpful?

