I’ll apologise for the poor formatting ahead of time
When using any text fields (F8 console, resource NUI, etc) some keys will input additional characters.
- alt, shift, and enter will send
1
- backspace will send
8
- left arrow and right arrow will send
3
- down arrow will send
4
This is without any sort of overlay running (Shadowplay, Steam, Overwolf, Discord, etc). I saw there was another issue which reported this problem with scaleforms, so I guess it’s just a general issue
The primary instance of FiveM seems to spike my CPU usage and stutters regularly, even without hitting 100% CPU. I typically run VSCode, FiveM, and FXServer on my system without any issue; even using -cl2 alongside my usual setup usually doesn’t cause noticeable stuttering.
No support for executing commands, such as allowing resources to grant ACL permissions. I assume this could be done as normal with setting a config file, but would be useful in project settings.
Convars are not set unless a value is changed. For example, I added mysql_connection_string
to oxmysql’s convar category but unless I change the value (space, then backspace) of any convar, none of them seem to be applied. Also, changing any convar will set all of them again which spams the console a bit.
JSON convars are not supported, despite being accepted by FXServer. I normally use the following, after learning it was valid syntax.
set ox_inventory_loot {
"vehicle": [
["cola", 1, 1],
["water", 1, 1]
],
"dumpster": [
["mustard", 1, 1],
["garbage", 1, 3]
]
}
config.lua and various other extensions are disliked, but there are many instances where config values need to be either a table or array.
While working on an update for my resource and adding convar_category I use the following (there is no CV_JSON or such).
{'Set the contents of randomly generated stashes', 'inventory:loot', 'CV_STRING', {[[
"vehicle": [
["cola", 1, 1],
["water", 1, 1]
],
"dumpster": [
["mustard", 1, 1],
["garbage", 1, 3]
]
]]}}
Beautifully rendering as a single-line in a tiny text-box.
For convenience, it would also be useful to have a native to reference convar_category so I don’t need to set defaults in both fxmanifest and the script files.
GetConvarCategory('resourceName:categoryName')
Last thing is just a suggestion; would be nice to get proper support with Lua Language Server. Right now I’m outputting native declarations with a node script, but I know there’s some native stuff somewhere since JS uses it.
I wrote up a library containing some environment variables, types/classes like vectors and statebags, and some stuff for json, msgpack, and LuaGLM functions as documented in the CfxLua readme; needs a lot of work though.
sumneko’s Lua extension supports loading libraries as well as plugins, to add support for custom text parsing (and other things).
function OnSetText(uri, text)
local diffs = {}
local count = 0
-- prevent diagnostic errors from safe navigation (foo?.bar and foo?[bar])
for safeNav in text:gmatch '()%?[%.%[]+' do
count = count + 1
diffs[count] = {
start = safeNav,
finish = safeNav,
text = ''
}
end
return diffs
end
I assume something similar could be done by adding it to the actual language file but at least it saves me from seeing hundreds of errors everywhere I look.
If I have any more feedback I’ll try to make separate posts since it’s easier to keep track of. I’m excited to see where things go and I’m trying to use FxDK while working on a new release, but sometimes I can’t handle the quirks.