Skraund

Members
  • Content Count

    34
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Skraund

  • Rank
    Rat
  • Birthday 01/01/2018

Recent Profile Visitors

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

  1. Hello everyone, I have a question. I connected to the MTA SA server using the SDK, but the SDK connects and transfers the data to the server via HTTP without any content protection. As I understand it, from one topic on the forum, the built-in MTA server does not support HTTPS, so the question is how to protect the transmitted data from the Web to the MTA server? Can I somehow make protection through nginx, for example? Sorry for my bad english.
  2. Hello, is it necessary to use in dbPrepareString() a database connection to which the request will not be sent? I just used in dbPrepareString() a connection with SQLite, and sent the request to the database MySQL and everything worked. Who exactly can say this can be done or what problems may arise in the future? Sorry for my bad english.
  3. Hi, how to ensure that these commands do not work in the console? If this is not possible, then how to ensure that they are not available to ordinary players? List of commands: Console Commands and CVars https://wiki.multitheftauto.com/wiki/Server_Commands https://wiki.multitheftauto.com/wiki/Client_Commands Sorry for my bad english.
  4. Hello, I have a few questions: 1. Question about variables. Suppose I created a variable and put a floating point number in it, the system will automatically allocate under this memory. But if I later assign this variable a nil value or another type with a smaller memory size, then the system will re-allocate this variable new memory or leave the same amount? I ask it, because there is a desire to reduce the amount of memory on the client side, so I wonder if there is any sense assign unused variables to nil. 2. I have repeatedly stumbled upon a traffic system, as in a single game, but with a large number of characters, it begins to lag. And many users of such resources notice this. Question - What could be these lags? A large number of calculations? Can you somehow remove or minimize these lags without reducing the number of characters in traffic? 3. At the forum I came across several questions about writing a project in Java. And as far as I understand, this is possible only on the server side. The question is how to write the server part of the MTA server in Java? Java SDK? Sorry for my bad english.
  5. Ok. And from Lua, you can send data through Java SDK? For example, when a player joined the server.
  6. Hello, I did not understand a bit about Java SDK. Can it be used to retrieve data from a table in the lua resource for the MTA server?
  7. Большое спасибо, это то, что мне нужно, тема закрыта.
  8. Hello, I have a resource airbrake with this code: function putPlayerInPosition(timeslice) local cx,cy,cz,ctx,cty,ctz = getCameraMatrix() ctx,cty = ctx-cx,cty-cy timeslice = timeslice*0.1 if getKeyState("num_7") then timeslice = timeslice*4 end if getKeyState("num_9") then timeslice = timeslice*0.25 end local mult = timeslice/math.sqrt(ctx*ctx+cty*cty) ctx,cty = ctx*mult,cty*mult if getKeyState("w") then abx,aby = abx+ctx,aby+cty end if getKeyState("s") then abx,aby = abx-ctx,aby-cty end if getKeyState("d") then abx,aby = abx+cty,aby-ctx end if getKeyState("a") then abx,aby = abx-cty,aby+ctx end if getKeyState("space") then abz = abz+timeslice end if getKeyState("lshift") then abz = abz-timeslice end setElementPosition(localPlayer,abx,aby,abz) end function toggleAirBrake() air_brake = not air_brake or nil if air_brake then abx,aby,abz = getElementPosition(localPlayer) addEventHandler("onClientPreRender",root,putPlayerInPosition) else abx,aby,abz = nil removeEventHandler("onClientPreRender",root,putPlayerInPosition) end end bindKey("num_0","down",toggleAirBrake) But I do not know how to move the character to turn him in the direction where the camera is looking. Can someone help with this?
  9. При таком варианте по одной оси персонаж поворачивается лицом туда, куда смотрит камера, а по другой оси поворачивается в противоположную сторону. У меня есть airbrake и мне нужно, чтобы когда персонаж перемещался, он смотрел лицом туда, куда направлена камера. Вот код: function putPlayerInPosition(timeslice) local cx,cy,cz,ctx,cty,ctz = getCameraMatrix() ctx,cty = ctx-cx,cty-cy timeslice = timeslice*0.1 if getKeyState("num_7") then timeslice = timeslice*4 end if getKeyState("num_9") then timeslice = timeslice*0.25 end local mult = timeslice/math.sqrt(ctx*ctx+cty*cty) ctx,cty = ctx*mult,cty*mult if getKeyState("w") then abx,aby = abx+ctx,aby+cty end if getKeyState("s") then abx,aby = abx-ctx,aby-cty end if getKeyState("d") then abx,aby = abx+cty,aby-ctx end if getKeyState("a") then abx,aby = abx-cty,aby+ctx end if getKeyState("space") then abz = abz+timeslice end if getKeyState("lshift") then abz = abz-timeslice end setElementPosition(localPlayer,abx,aby,abz) end function toggleAirBrake() air_brake = not air_brake or nil if air_brake then abx,aby,abz = getElementPosition(localPlayer) addEventHandler("onClientPreRender",root,putPlayerInPosition) else abx,aby,abz = nil removeEventHandler("onClientPreRender",root,putPlayerInPosition) end end bindKey("num_0","down",toggleAirBrake)
  10. Здравствуйте, перейду сразу к делу. Я получаю координаты камеры игрока через getCameraMatrix() и затем я хочу повернуть его туда, куда смотрит камера, но у меня никак не получается это сделать. Кто знает, как нужно обработать данные полученные из getCameraMatrix(), чтобы их можно было ввести в setElementRotation и потом персонаж поворачивался в ту сторону, куда смотрит камера?
  11. Здравствуйте, можно ли как-то увидеть ник над своим персонажем? Просто хочу создать кастомный ник, но не знаю как его настраивать без других людей на сервере.
  12. Hello everyone, I decided to create my own custom nickname above the player, but there was some difficulty. How to make it so that you can see your nickname above the character? Sorry for my bad english
  13. Thank you very much for your help!
  14. Hello, I'm having a problem, I need to call a function in the browser from the lua script. But I can not do it at all. ----------------------------------------------------------------------------------------------------------------------------------------- HTML: <script> function chat() { var text = document.getElementById( "Text" ).value document.getElementById( "Text" ).value = "" } </script> LUA: executeBrowserJavascript( theBrowser, "?" ) ----------------------------------------------------------------------------------------------------------------------------------------- Someone can tell how to call a function in the browser from the lua script?
  15. Is it possible to draw 100 lines of text at the same time as the FPS is reduced by 4-5 units, and not by 20 units?