-
Posts
40 -
Joined
-
Last visited
Everything posted by Skraund
-
Hi everyone, I want to ask, can I somewhere download the web applications of the site luac.multitheftauto.com and run locally? If not, tell me which flags does luac_mta.exe accept?
-
Described his assumption here: https://github.com/multitheftauto/mtasa-blue/issues/1091#issuecomment-539521785
-
The resource is unzipped. Client and server latest version. Anyway, nothing works.
-
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.
-
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.
-
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?
-
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.
-
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.
-
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.
-
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.
-
Ok. And from Lua, you can send data through Java SDK? For example, when a player joined the server.
-
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?
-
Большое спасибо, это то, что мне нужно, тема закрыта.
-
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?
-
При таком варианте по одной оси персонаж поворачивается лицом туда, куда смотрит камера, а по другой оси поворачивается в противоположную сторону. У меня есть 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)
-
Здравствуйте, перейду сразу к делу. Я получаю координаты камеры игрока через getCameraMatrix() и затем я хочу повернуть его туда, куда смотрит камера, но у меня никак не получается это сделать. Кто знает, как нужно обработать данные полученные из getCameraMatrix(), чтобы их можно было ввести в setElementRotation и потом персонаж поворачивался в ту сторону, куда смотрит камера?
-
Здравствуйте, можно ли как-то увидеть ник над своим персонажем? Просто хочу создать кастомный ник, но не знаю как его настраивать без других людей на сервере.
-
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
-
Thank you very much for your help!
-
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?
-
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?
-
Hello, I hid the standard chat and created a new chat. All works well, except for one, when drawing a single line, I draw the text 5 times, 1 time the color text, and 4 is the black text that is shifted along the OX and OY axes to make a stroke. But when 20 lines are drawn, the FPS is reduced by 20 units. Someone knows how to draw text with a stroke, but at the same time, the FPS does not fall much? P. S. I tried to draw the text through the CEF, the FPS did not fall, but there were strong delays while drawing the text, can someone know how to draw the text through the shaders? Sorry for my English.
-
Hello, I would like to clarify something about this function. In its description it is said that it can heavily burden the system. Therefore, I want to ask people who understand this topic, to teach how to use it correctly. For example, if you store only a few characters for each of players, will this burden the system? Sorry for my bad english.
-
Здравствуйте, может кто-то подсказать как сделать так, чтобы во время загрузки файлов сервера был не черный экран, а, например, вид на город LS?
-
Здравствуйте, почитав вики по MTA, я немного не понял насчёт выбора второго обязательного аргумента addEventHandler, обычно там ставят root, то есть, как я понял, данное событие привязывается ко всем элементам в дереве, но я замечал и другие варианты. Так вот, люди, которые хорошо в этом разбираются, объясните новичку как правильно подобрать этот аргумент, из чего нужно исходить при его выборе. Заранее спасибо.