I’m creating a server to play with my friends. It seems that no one can use commands. It says that comand is disable in production mode.
I searched about this production mode and found that it’s possible to get around it by adding an additional argument to the FiveM shortcut.
That solves the problem, but I don’t want to solve it this way. I don’t want to force my friends to have to make local changes to be able to use commands on my server.
I’m currently using txAdmin v4.17.1 (latest recommended). I’m also running the server on my local machine.
Is there a server-side option to take this out of production mode or something?
I recently detected that only the commands in the scripts I made don’t work. The default ESX commands like /car or /heal are working fine.
If you need more information, please let me know.
Do you have the code for an example command? Script commands should work fine even on production mode, at least if you’re correctly using RegisterCommand.
--[[ Functions ]]--
function OpenUI()
SetNuiFocus(true, false)
SendNUIMessage({ type = 'open' })
end
function CloseUI()
SetNuiFocus(false, false)
SendNUIMessage({ type = 'close' })
end
configs/main.lua
_DEBUG = true
if _DEBUG then
RegisterCommand('test', function(source)
if source > 0 then return end
OpenUI()
end, true)
end