# MDT Compatibility

## ps-mdt

{% stepper %}
{% step %}
View the code on GitHub: [ps-mdt/server/main.lua](https://github.com/Project-Sloth/ps-mdt/blob/bb17c91354f9851053694695863f224aaa24b669/server/main.lua#L125)

REPLACE the code exactly as seen in the screenshot below.

{% code title="ps-mdt/server/main.lua — line 125" %}

```lua
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
```

{% endcode %}

<div data-with-frame="true"><figure><img src="https://789235289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSKsM-AnxI2icNixJI8%2Fuploads%2FCeRcVhNrIQUoVauietwf%2FScreenshot%202025-11-07%20230106.png?alt=media&#x26;token=6e63566a-eb11-439c-87bb-5c712d04c58b" alt="" width="563"><figcaption><p>Before and After</p></figcaption></figure></div>
{% endstep %}

{% step %}
View the code on GitHub: [ps-mdt/server/main.lua](https://github.com/Project-Sloth/ps-mdt/blob/bb17c91354f9851053694695863f224aaa24b669/server/main.lua#L256)

REPLACE the code exactly as seen in the screenshot below.

{% code title="ps-mdt/server/main.lua — line 256" %}

```lua
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
```

{% endcode %}

<div data-with-frame="true"><figure><img src="https://789235289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSKsM-AnxI2icNixJI8%2Fuploads%2FqWYryb0Z8gXdo8bajgVY%2FScreenshot%202025-11-07%20230700.png?alt=media&#x26;token=6db82a04-4ade-4da0-b02a-c443cf805f97" alt="" width="563"><figcaption><p>Before and After</p></figcaption></figure></div>
{% endstep %}

{% step %}
View the code on GitHub: [ps-mdt/server/main.lua](https://github.com/Project-Sloth/ps-mdt/blob/bb17c91354f9851053694695863f224aaa24b669/server/main.lua#L321)

REPLACE the code exactly as seen in the screenshot below.

{% code title="ps-mdt/server/main.lua — line 321" %}

```lua
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
```

{% endcode %}

<div data-with-frame="true"><figure><img src="https://789235289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSKsM-AnxI2icNixJI8%2Fuploads%2FwH0eJEdDYDf3JSlh4j0f%2FScreenshot%202025-11-07%20231153.png?alt=media&#x26;token=ffdf86ea-b8ef-41c7-9a3c-f6c4890cda6b" alt="" width="563"><figcaption><p>Before and After</p></figcaption></figure></div>
{% endstep %}

{% step %}
View the code on GitHub: [ps-mdt/client/main.lua](https://github.com/Project-Sloth/ps-mdt/blob/bb17c91354f9851053694695863f224aaa24b669/client/main.lua#L17)

REPLACE the code exactly as seen in the screenshot below.

{% code title="ps-mdt/client/main.lua — line " %}

```lua
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)
```

{% endcode %}

<div data-with-frame="true"><figure><img src="https://789235289-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MSKsM-AnxI2icNixJI8%2Fuploads%2FjrXQ5C8IP5jWZULdGE5m%2FScreenshot%202025-11-07%20231600.png?alt=media&#x26;token=2519f15f-ebff-41f6-a357-39991c3ce7e1" alt="" width="563"><figcaption><p>Before and After</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}
