its good or what____
Tons of errors, unusable right now.
Housing is obfuscated with errors, so it's not repairable.
Probably gonna need 20 credits back. I'm still trying to fix the MDT.
Mdt works just needed nui focus fixing took like 5 min just add helper to bottom of the client lua
Can you provide the fixed client.lua? It's all obfuscated and not working.
The only client.lua I could find is client > main.lua and I added this to the obfuscation without any luck:
local MDT_UI_OPEN = false
local MDT_DISABLE_THREAD = nil
local function mdt_setFocus(state)
MDT_UI_OPEN = state
-- Give/clear focus + keep input so you can still move camera if you want
SetNuiFocus(state, state)
SetNuiFocusKeepInput(state)
-- (Optional) show the built-in cursor hint
-- SetCursorLocation(0.5, 0.5)
-- Spin a control-disabling thread only while UI is open
if state and MDT_DISABLE_THREAD == nil then
MDT_DISABLE_THREAD = CreateThread(function()
while MDT_UI_OPEN do
-- Block most gameplay controls while NUI is focused
DisableControlAction(0, 1, true) -- LookLeftRight
DisableControlAction(0, 2, true) -- LookUpDown
DisableControlAction(0, 16, true) -- NextWeapon
DisableControlAction(0, 17, true) -- PrevWeapon
DisableControlAction(0, 22, true) -- Jump
DisableControlAction(0, 24, true) -- Attack
DisableControlAction(0, 25, true) -- Aim
DisableControlAction(0, 37, true) -- SelectWeapon
DisableControlAction(0, 44, true) -- Cover
DisableControlAction(0, 45, true) -- Reload
DisableControlAction(0, 75, true) -- Exit vehicle
DisableControlAction(0, 140, true) -- Melee attack light
DisableControlAction(0, 141, true) -- Melee attack heavy
DisableControlAction(0, 142, true) -- Melee alternate
DisableControlAction(0, 199, true) -- Pause/Menu
DisableControlAction(0, 200, true) -- ESC / Back
DisableControlAction(0, 257, true) -- Attack 2
DisableControlAction(0, 263, true) -- Melee
DisableControlAction(0, 264, true) -- Melee
DisableControlAction(0, 322, true) -- ESC
DisableControlAction(0, 106, true) -- Vehicle mouse control override
-- Let player close with ESC if your HTML doesn’t already send a close
if IsControlJustPressed(0, 200) or IsControlJustPressed(0, 322) then
-- Tell UI to close itself (your html/js should listen) OR just hard-close here:
SendNUIMessage({ action = "mdt:requestClose" })
-- Failsafe hard-close after 150ms in case UI doesn't respond
SetTimeout(150, function()
if MDT_UI_OPEN then
mdt_closeUI()
end
end)
end
Wait(0)
end
MDT_DISABLE_THREAD = nil
end)
end
end
function mdt_openUI(payload)
-- payload is optional; pass anything your UI needs (player/job/etc)
SendNUIMessage({ action = "mdt:open", data = payload })
mdt_setFocus(true)
end
function mdt_closeUI()
SendNUIMessage({ action = "mdt:close" })
mdt_setFocus(false)
end
-- NUI callbacks expected from your HTML/JS
-- Call `fetch('https:///mdt:ready', {method: 'POST', body: '{}'})` when UI is ready
RegisterNUICallback('mdt:ready', function(_, cb)
cb(1)
end)
-- Call this from JS when user clicks your UI close/X button
RegisterNUICallback('mdt:close', function(_, cb)
mdt_closeUI()
cb(1)
end)
-- Optional: focus on/off from JS if you need it (modals, text inputs, etc.)
RegisterNUICallback('mdt:setFocus', function(data, cb)
local state = data and data.state == true
mdt_setFocus(state)
cb(1)
end)
-- Optional: open from server or other client code
-- Example: TriggerEvent('mdt:client:open', { plate = '00ABC123' })
RegisterNetEvent('mdt:client:open', function(data)
mdt_openUI(data)
end)
RegisterNetEvent('mdt:client:close', function()
mdt_closeUI()
end)
-- Safety: if the resource stops while focused, release focus so player isn't stuck
AddEventHandler('onResourceStop', function(res)
if res == GetCurrentResourceName() and MDT_UI_OPEN then
SetNuiFocus(false, false)
SetNuiFocusKeepInput(false)
end
end)
No idea why OP is claiming any of this is open-sourced.. because it's all obfuscated with errors. Don't waste your credits here until he fixes some of it.