Skraund

Members
  • Content Count

    39
  • Joined

  • Last visited

Community Reputation

1 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. Described his assumption here: https://github.com/multitheftauto/mtasa-blue/issues/1091#issuecomment-539521785
  2. The resource is unzipped. Client and server latest version. Anyway, nothing works.
  3. Hello again to everyone. Today I installed the latest version of the server for Windows. The client is also the latest version. And still, the local path for browsers does not work. Checked on another system, also does not work. I ask you, dear reader, to try to run the code from the first post in version 1.5.7 and unsubscribe here about the results.
  4. Yes, webfile is another resource. The file is present in the html folder. I think this is some kind of bug version 1.5.7, because the server worked well when the client version was 1.5.6, then updated the client to 1.5.7, went to the server and this error appeared. I tried to update the server itself, it did not help.
  5. After updating 1.5.7, the browser stopped loading the local html file and gives an error of 404. In 1.5.6, everything worked fine. Here is the code: local screenWidth, screenHeight = guiGetScreenSize( ) local window = guiCreateWindow( 0, 0, screenWidth, screenHeight, "Web Browser", false ) local browser = guiCreateBrowser( 0, 28, screenWidth, screenHeight, true, false, false, window ) local theBrowser = guiGetBrowser( browser ) addEventHandler( "onClientBrowserCreated", theBrowser, function( ) loadBrowserURL( source, "http://mta/webfile/file/html/test.html" ) end ) Who knows what could be the problem?
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. Ok. And from Lua, you can send data through Java SDK? For example, when a player joined the server.
  11. 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?
  12. Большое спасибо, это то, что мне нужно, тема закрыта.
  13. 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?
  14. При таком варианте по одной оси персонаж поворачивается лицом туда, куда смотрит камера, а по другой оси поворачивается в противоположную сторону. У меня есть 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)
  15. Здравствуйте, перейду сразу к делу. Я получаю координаты камеры игрока через getCameraMatrix() и затем я хочу повернуть его туда, куда смотрит камера, но у меня никак не получается это сделать. Кто знает, как нужно обработать данные полученные из getCameraMatrix(), чтобы их можно было ввести в setElementRotation и потом персонаж поворачивался в ту сторону, куда смотрит камера?