Jump to content

4O4

Members
  • Posts

    25
  • Joined

  • Last visited

Details

  • Location
    Not found

Recent Profile Visitors

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

4O4's Achievements

Advanced Member

Advanced Member (8/54)

6

Reputation

  1. Actually I've made a simple native server module for exactly this purpose - to pass some configuration or secrets via env variables to the MTA server running in docker container. There is a "getSystemEnvVariable(string variableName)" function there (no "set" counterpart as I didn't need it, but could be implemented easily). Currently I haven't published any releases of .dll / .so but the code is available on Github and you can build it yourself easily: https://github.com/4O4/mta-ml-sysutils Generic building instruction is: run "utils/premake5 gmake && cd Build && make" on linux, and on windows run: "utils/premake5.exe vs2019" and then open Build/*.sln file in visual studio and launch build from there. After a successful build the dll / so will be in Bin/ folder. If you need help with building or want me to publish binaries built by me on github releases, just let me know. This module also includes a second utility function "executeSystemCommand(string systemCommand, function commandFinishedCallback(exitCode, stdout, stderr))" for executing system commands asynchronously in a separate thread, although I ended up not using it very much so I don't know about its stability. Should work but no guarantees, I'm just informing you that it exists in the same module and that's why it is called "sysutils".
  2. One line of minified code, both with and without the upcoming update . Awaiting the cookie!
  3. This question has already be answered in another topic titled exactly the same as this one and laying in the same subforum
  4. 4O4

    HTTPS Server

    Nginx reverse proxy is the best and safest workaround IMHO. Although you need to learn how to configure it properly.
  5. GuiSetInputEnabled GuiSetInputMode
  6. You need to implement mute handling in your globalMessage function, check IsPlayerMuted
  7. It must be Player, but not necessarily a variable named "player" (which was nil in your case, because you never told your script what it is). Both of your functions are executed by some events, and all events have a source (which is also a special variable available in scope of the function that gets executed by event). If you open the documentation page on wiki for onPlayerWasted you can see that in this case the source of event is some Player. There is plenty of information on wiki, so you just need to learn how to use it properly. Follow the links and read everything which is related to the functions or events you want to use. Start by clicking on "source" link and you will see all information about event system Then check some Lua tutorials to learn about variables, scopes, functions etc., there are links on main wiki page too (https://wiki.multitheftauto.com/wiki/Main_Page, General Lua Help section).
  8. It is almost impossible to debug without a test script. Can you provide one?
  9. Hi, please use Code button next time you are pasting Lua code if getPlayerTeam == Infected then This condition looks bad and it is probably never true. getPlayerTeam is a function so it should be called - check wiki for examples. Also, Infected should probably be quoted if it is team name literal. function removePlayerZombie() if getElementData (player,'zombie',true) It is throwing warning, because you haven't defined "player" anywhere. It should probably be "source" in your case instead.
  10. Good job @Jusonex! @AfterAll14 just a quick note - don't forget to re-run premake (create-projects.bat) after you pull this fix from git, because faulty command is saved in projects, so they must be fully regenerated.
  11. Never use special characters or spaces in file / directory names during development, it will save you a lot of time in the future. I bet it is your "MTA SA" folder that is causing the problem
  12. Okay, you can PM me if you want.
  13. Sorry, I'm unable to reproduce your issue. I tried all your code and it didn't throw this error. The problem might be somewhere else and I think you have to debug it all by yourself.
×
×
  • Create New...