Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

vicisdev's Achievements


Snitch (10/54)



  1. Yeee I see pool sessions finally available in MTA SA: be the most wanted pool player in San Andreas. Excellent work, I'm impressed.
  2. Guys go to any GitHub repository and press the period (.) key in your keyboard. Watch the magic happens... https://github.com/multitheftauto/mtasa-resources
  3. vicisdev

    CEF Issues

    Could you send me your files so I can inspect it better?
  4. vicisdev

    CEF Issues

    You should always check logs to see what is happening. Run your script in debug mode 3 and check the console output. You can: 1. OutputDebugString(inspect(theBrowser)) to see if it's being created properly 2. Try to load an external source (https://mtasa.com)
  5. vicisdev

    CEF Issues

    Excuse me. In fact, /local/ is supposed to be the resource name. So you would do http://mta/<resource_name>/<path_to_html> if your .html is located in another resource otherwise you can still use /local/ for files located in the same resource. You should add your index.html file using the <file /> tag in your meta.xml. https://wiki.multitheftauto.com/wiki/Local_Scheme_Handler
  6. vicisdev

    CEF Issues

    If you've written your meta.xml properly the URL should be http://mta/local/<path_to_.html>. You've missed the /local/.
  7. Wait, how were you able to run MTA in wine? Which version are you running?
  8. I tested 4 and for 10000 iterations on every frame it would increase the frame drawn time by about 4ms (on my PC). I don't know if someone would get a UI with more than 10000 function calls per render, but creating tables does decrese performance. About the third point, I'm not asking to rewrite the MTA API, this practice could be good for later community created libraries. The second point the first sentence I think it's not a problem since you have to know what every parameter means anyway. The first one, I don't fear writing more in order to get better readability. I see a lot of people writing a function call in a single line +100 characters long specially when using DX because they think less lines is better or even naming variables on character long. From the perspective of the interpreter just minify your files and you're good. This is very specialized. I'm not a Lua expert, I had no clue about this opcode, I have no idea what's happening here but it's cool. But this opcode would need to be added in the MTA's Lua library, wouldn't it? It's not a configuration you can toggle in your server config files.
  9. Please read the edited version of my answer if you have not already
  10. Ok, I know I could create a workaround to it but this is just a discussion. Also, you wouldn't want to call two unpacks on a function like interpolateBetween which run on every frame. Your first example is quite interesting and made me search for "Lua named argument". It turns out Lua already have named arguments built in, but it's not how you wrote it. It would be something like this: local function coolFunction(args) -- ... end coolFunction { param1 = "val1", param2 = "val2", param3 = "val3" } I've already used it but I totally forgot about it lol. Anyway the discussion remains the same.
  11. Often times more complex function which do a lot to the user requires a lot of required and optional parameters. Think about InterpolateBetween function. Is it a best practice to instead of countless parameters passed in to a function to pass in a single table which keys matches those parameters? If not can we turn this into a best practice? A thing such as passing an options table makes the code auto documented so when you look at it you know exaclty what that "false" value means. Bad way The code below shows how clueless it can be when you have a lot of parameters to a function. To be honest, it could be even worst if written all in a sigle line. interpolateBetween( 0, 0, 0, 10, 10, 10, 0.5, "Linear" ) Good way This seems more interesting, doesn't it? You know exactly what all those values means. What do you think? interpolateBetween({ from = { 0, 0, 0 }, to = { 10, 10, 10 }, progress = 0.5, easing = "Linear" }) This also makes it easier to work with optional parameters
  12. I fixed it. You can now download the repository again and hopefully use it.
  13. I'm sorry. I've accidentally deleted my repository where the server's binary were stored. I'll be fixing this today. As soon as I finish this, I'll let you know.
  14. You can still download and use it, but I stopped working on this for quite a while now. Don't expect this to work 100% properly. This maily lacks meta.xml support. You can download it here https://github.com/alvesvin/mtabt-template/archive/refs/heads/master.zip
  • Create New...