JamesMerth Posted October 10, 2022 Share Posted October 10, 2022 Apparently nobody seems to use the lua api in this gta mod menu, since I'm the first post here. However I've got a few suggestions: Switch to Luajit since it's considerable faster and it provides ffi which let's you call c functions through lua Implement some sort of pattern scanning through lua More advanced web functions header, body, parameters, timeout for requests async web requests by passing a callback function like -- web.get(url, header, body, complete) web.get("www.google.com", nil, nil, function(data) if data.status ~= 200 then error(string.format("Error request failed, status: %d", data.status) end print(data.body) end) put, delete (and maybe other less important functions like head, options, patch as well) websocket support More rendering function loading custom fonts and drawing text with said font scissorrect drawing blurred rectangles e.g draw_rect_blur(hash, draw, x, y, w, h, blur_strength, rounding = 0, rounding_flags = 0) support for utf8 characters fore draw_text (not sure if that's already the case) Link to comment Share on other sites More sharing options...
Administrators Antrix Posted October 10, 2022 Administrators Share Posted October 10, 2022 2 hours ago, JamesMerth said: Apparently nobody seems to use the lua api in this gta mod menu, since I'm the first post here. However I've got a few suggestions: Switch to Luajit since it's considerable faster and it provides ffi which let's you call c functions through lua Implement some sort of pattern scanning through lua More advanced web functions header, body, parameters, timeout for requests async web requests by passing a callback function like -- web.get(url, header, body, complete) web.get("www.google.com", nil, nil, function(data) if data.status ~= 200 then error(string.format("Error request failed, status: %d", data.status) end print(data.body) end) put, delete (and maybe other less important functions like head, options, patch as well) websocket support More rendering function loading custom fonts and drawing text with said font scissorrect drawing blurred rectangles e.g draw_rect_blur(hash, draw, x, y, w, h, blur_strength, rounding = 0, rounding_flags = 0) support for utf8 characters fore draw_text (not sure if that's already the case) Lua is more actively discussed on discord and on the test server. Thanks for your suggestions, I'll definitely consider them. I can’t say that we will be able to switch on LuaJit soon, because too much time has already been devoted to Lua to the detriment of other sections and functionality, but we will definitely return to this issue very soon. Regarding web requests, I will pass all this on to the person who is responsible for the network part 😉 UPD: I just looked again at the documentation, our lua lib supports LuaJIT, so we will add support for it soon. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now