Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. For a access scoped accounts. Step 1. Make a backup of your acl.xml file. Step 2. Create a new account with for example the name: /register user_XTrqveZgi8 {password} Step 3. Modify the acl.xml. Add a group: Used for defining who has access to what. The prefix user.{username} is used to define that it is a user account that is granted access. <group name="webaccess"> <acl name="webaccess_acl"></acl> <object name="user.user_XTrqveZgi8"></object> </group> And the access list: Used to define the access rights. Replace resource.{resourcename}.http with the resource that is allowed to be accessed to. You can also rename webaccess_acl, but you also have to update the same name in the acl tag located in the group: <acl name="{name}"></acl>) <acl name="webaccess_acl"> <right name="resource.resourcename.http" access="true"></right> </acl> This all will grand the user 'user_XTrqveZgi8' access to http requests to resource {X}. Things to keep in mind: Never use an old ACL, because not yet created -> known accountnames can be recreated by a random player in your server. Always make a backup of your ACL file.
  4. UPDATE: I figured that it was an acl issue, that I had to enable HTTP for everyone, so the created API can be available for everyone, even the ones who don't have any auth But I will be needing help on ACL, since I am creating a new form scratch gamemode, I will need to write my own and custom acl as well. Or perhaps use the current account system of MTA as well since I can't edit to create my own And I appreciate a lot for the helps IIYAMA gave me during this issue with the stuff I had with CEF and how they should communicate.
  5. Thanks for pointing out the way JS works to do the authorization. The weird thing is, I tried to send a test request to my created HTTP API Resource, using Postman (and some other REST clients) But they seem to all say and return 401 errors from the mta server saying "Access denied, please login" Even tho i can see in my server console saying: "[2026-01-28 11:40:56] HTTP: 'ehsan' entered correct password from 127.0.0.1" And yet returning the access denied error Have you perhaps encountered any similar issues like this? Even tho I have debug logs to see if even the HTTP router function of mine get's triggered, but it does not.
  6. Yesterday
  7. Not sure what kind of backend you use. But here is an npm packets that could be used for inspiration. Probably some dependencies are deprecated. https://github.com/4O4/node-mtasa/tree/master The authOptions: https://github.com/4O4/node-mtasa/blob/aeac8ab9417a7b6a65f117491d1e648a6ad62422/src/client.ts#L107C17-L107C28 Using it in request: https://github.com/4O4/node-mtasa/blob/aeac8ab9417a7b6a65f117491d1e648a6ad62422/src/client.ts#L62 But under the hood (in JS) it is something like this: const credentials = `${username}:${password}`; const encodedCredentials = Buffer.from(credentials).toString('base64'); const result = "Authorization: Basic " + encodedCredentials The header is: Authorization The value is something like: Basic bWlqblVzZXI6Z2VoZWltV2FjaHR3b29yZA==
  8. Seems like there are a lot of things that I must see and learn again from the docs, thanks for pointing that out. With this information, I can update my frontend code to connect to the API resources I will create, which will handle everything; there will be no further events between the browser and the client. But as I wrote a test API server, it seems that I have to pass in the Basic Authentication on every request, Since I won't be using the default account system, it's fine for me to just pass a basic token, but generating it is the question for me at the moment. As you provided the link on Wikipedia, I don't know what I should send in the headers. There was a client ID and a client-secret-key. Should I just create an account on my MTA server, place the username instead of the client ID, and the password instead of the secret key, and generate a Basic auth key? Then, what header should I send it with? Because if I send a normal GET request on a resource I created with httpRouter, it asks me for username and password on my alert, I put the true creds, but after submitting, I see the server logs saying that I logged in, but the API asks again. So a little help on this part would be much appreciated.
  9. Szia! Igen lehetséges hogy, egy adott resource indítja el a többi számodra nem szükséges resource-öket. Azt javaslom hogy próbáld meg a server.conf-ban hogy az összes resource listát kiveszed és mondjuk 1-2db resource-öt teszel a listába teszt jellegel amik mondjuk kelleni fognak, és így csináld mindegyikkel amely resource kell neked (igen hosszadalmas meló, de megéri ).. és ha mondjuk be tettél a listába új 1-2db resource-t de előtte nem indult el a többi ami nem kell.. Akkor tudod is a probléma forrását és a resource nevét amely elindítja az összes létező resource-t. Remélem tudtam neked segíteni!
  10. It should be for security concerns. You wouldn't want to visit a site that is designed to look for 'new functions' and starts call them. If you take a look at this page: https://wiki.multitheftauto.com/wiki/Meta.xml You can see that it is possible to call an export function over http What syntax do you need for calling an export function? http://<your IP>:<your port>/<resource_name>/call/<exported_function_name> https://wiki.multitheftauto.com/wiki/Resource_Web_Access How does authentication works? https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side A 'basic' authentication should the way to go. It requires login credentials of an MTA user account with the correct permissions. This has to be passed every request. When you connect through the browser: http://127.0.0.1:22005/resourcebrowser/ You more or less understand what to expect. There is also a section about 'Router', which is new. Might be useful. https://wiki.multitheftauto.com/wiki/Resource_Web_Access#Router For inspiration https://community.multitheftauto.com/index.php?p=resources&s=details&id=18781 This resource is about fetching data from MTA to a (remote) host. This is the opposite of what you are trying to achieve, but probably still useful. Fetching from MTA to remote host Creating a MTA user (installation_s.lua) that only has the correct permissions.
  11. Hey Everyone, I was creating my own framework from scratch, and I wanted to use CEFs as HUD's and obviously Login pages and stuff As I was going through, I wrote the perfect browser manager for myself, But for some reason, my events from the JS to LUA are not being triggered, Even tho I opened the dev console, and I saw that "window.mta" with the "triggerEvent" function inside that exists. So Idk, is this normal to not be able to trigger an event on a remote URL? And if not, I was thinking about the structure of how it should be, I know that if it's true, then I should be able to load my login/huds of the browsers somehow and let them connect to the server as well First Solution: - Load the remote login page -> React web page API calls to Backend -> Backend talks to MTA Server But obviously, how? The MTA doesn't provide us with any resources to at least create an API server on a server-side resource, so we can manage that, and it's impossible Or maybe you have an idea about what I can do in this solution 2nd Solution: - Load a local HTML Page that has an iframe inside it, set the iframe to max width and max height, load a JS file as well, and inside that JS file, provide a bunch of functions written, such as loadURL to change the URL of that iframe, etc. Now this custom HTML loads, works (at least fine, I have to change my frontend obviously, do not know if it's good to use for HUD's either. But it works, and in this solution, as I am writing this, I can't feel sorry for myself, But I don't know how to load that HTML File XD I have a resource called "[core]", inside this has a folder of resources called "browser", and inside that we have a folder called "ui" with index.html and other files inside it.And I have no idea how to load it, or even how the loading of the JS scripts should be written inside it If you can help me with my solution, and recommend me a way via this solution, I would appreciate it.
  12. Jogue no seu servidor com todos os scripts desativados (exceto os resources nativos). Então vá ativando um por um a cada hora até os controles do seu jogador forem desativados, assim você descobre qual resource está causando o problema.
  13. Last week
  14. someone can help i cant join all server
  15. **الوحيد, والافضل** **بكسيس هوست** توفر خدمات السيرفرات بارخص الاسعار (نوفر الكريديت) مثل:- > Multi Theft Auto > San Andreas Multiplayer [SA:MP] > Discord Bots **انضم الينا الان, ولا تفوت الفرصة*** https://discord.gg/dj687D7GeV ||@everyone||
  16. Mozi.

    cd20 error

    same issue, cant fix it
  17. i help my friend and i think yea all server
  18. Is the same error occurring on every server?
  19. Bem tenho um servidor e ja esta na reta final so que me esta acontecendo um bug muito chato e bem aleatorio, em certos momentos o player perde acesso as teclas apenas pode usar f1,f2,f3 etc já wasd espaço shift etc fica bloqueado alguem sabe oque pode ser ?
  20. i join the server and It says "connection to the server was lost."
  21. No problem with script i can change the others but i have a problem with this one
  22. Earlier
  23. Проблема с репликатором сервера после обновления MTA : игрок , скачивающий машину , испытывает какой - то сбой и вылетает ( с ошибкой « засорение памяти » ) . Всё началось после выпуска сборки MTA с r23599 , на r23324 всё работало нормально . https://pastebin.mtasa.com/6844764744
  24. I installed MTA on my device, and when I try to connect to any server, I get a "Serial change/spoofer x5" error. I've never installed a spoofer, but it detects it somehow. I've tried reinstalling the system, installing MTA on different drives, etc. I've done some reading on the subject and think it might be caused by non-standard components or drivers. I have a Clevo laptop with a PC processor. I'm hoping for quick help. Best regards, Danji I installed MTA on my device, and when I try to connect to any server, I get a "Serial change/spoofer x5" error. I've never installed a spoofer (before this error I didn't know what it was) , but it detects it somehow. I've tried reinstalling the system, installing MTA on different drives, etc. I've done some reading on the subject and think it might be caused by non-standard components or drivers. I have a Clevo laptop with a PC processor.I don't know if it matters, but when I turn on the system for the first time after starting it, it crashes.I'm adding a few screanshots. I'm hoping for quick help. Best regards, Danji
  25. What do you mean? I've already reinstalled Windows. The MTA serial number hasn't changed.
  26. Reset your computer using a USB drive; this will definitely solve the problem.
  27. Hello, MTA Province does not use the official client, so we cannot provide assistance with the issues you are experiencing there. It may be worth trying to contact their team.
  1. Load more activity
×
×
  • Create New...