-
Posts
1,039 -
Joined
-
Days Won
11
Everything posted by Sarrum
-
I see two options: 1) Use CEF and parse the user-agent setting (as the legacy build uses a certain version). 2) Parse the XP/Vista build numbers from https://nightly.multitheftauto.com/ and compare with the client version.
-
Значит в эдиторе не полный список, что печально.
-
Привет. Для этой модели нет LOD'а. Список можно посмотреть здесь: mapEditorScriptingExtension_s.lua#L51
-
Stack overflow возникает, когда функция вызывает сама себя без завершения после первого вызова (как бесконечный цикл). Стоит назвать функцию экспорта по-другому и такой проблемы не будет.
-
I think it should work: local password = "" local salt = "" passwordVerify ( password, "$2a$13$" .. salt, { insecureBcrypt = true }, function ( correct ) print ( correct ) end )
-
Вроде как у dgs такой возможности нет.
-
В этот же ресурс. Сервер: for _, vehicle in pairs ( getElementsByType ( "vehicle", resourceRoot ) ) do toggleVehicleRespawn ( vehicle, true ) setVehicleRespawnDelay ( vehicle, 10000 ) setVehicleIdleRespawnDelay ( vehicle, 60000 ) end setVehicleRespawnDelay - устанавливает через сколько будет респавн т/с после взрыва, setVehicleIdleRespawnDelay - респавн в простое. Время в миллисекундах. Есть и другие варианты, но и этот подойдет, если нужно респавнить весь транспорт ресурса.
-
Доступ к определенному авто к определенной группе
Sarrum replied to Erema93's topic in Russian / Русский
Удали 6-ую строку и if getPlayerTeam ( player ) == "Машинист" then замени на: if getPlayerTeam ( player ) == teamjob then -
@mehmet isElement - проверяет валидность элемента (переданное значение элемент/ не элемент), getElementData - для получения даты элемента (которая задана до этого функцией setElementData) с определенным ключом. У них совершенно разные предназначения. Так как мы добавляем данные в таблицу, нам нужно событие onElementDestroy, которое сработает при уничтожении элемента (у нас при удалении транспорта), чтобы удалить этот элемент (транспорт) из таблицы. В противном случае могут возникнуть проблемы с утечкой памяти.
-
Если вдруг кто столкнется с подобной проблемой, как вариант: local vehicleEngine = { } function switchEngineState ( player ) local vehicle = getPedOccupiedVehicle ( player ) if ( vehicle ) then setVehicleEngineState ( vehicle, not getVehicleEngineState ( vehicle ) ) end end addEventHandler ( "onVehicleEnter", root, function ( player, seat ) if ( seat == 0 ) then setVehicleEngineState ( source, vehicleEngine [ source ] or false ) bindKey ( player, "1", "down", switchEngineState ) end end ) addEventHandler ( "onVehicleExit", root, function ( player, seat ) if ( seat == 0 ) then vehicleEngine [ source ] = getVehicleEngineState ( source ) unbindKey ( player, "1", "down", switchEngineState ) end end ) addEventHandler ( "onElementDestroy", root, function ( ) if getElementType ( source ) == "vehicle" then if vehicleEngine [ source ] then vehicleEngine [ source ] = nil end end end )
-
I had to change the hosting. On the old it was impossible to update the server and support just ignored me. There are no such problems on the new one. Thanks for the help.
-
Hello. Sometimes my server randomly crash/shutdowns by itself. And in the server log there is no info (only the last chat message before the restart). Dumps: https://upload.mtasa.com/u/128473414/dumps.zip_ Ver: 1.5.6-9.14688.0 Can someone help me to find what causes this problem? Thanks.
-
You can find texture name with https://wiki.multitheftauto.com/wiki/Shader_examples#Texture_names
-
I think you should contact the server owner about your issue.
-
https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#UTF8_Library
-
Ensure that both your graphics drivers and DirectX are updated. Check for any program with an overlay such as Discord or Steam. Also try this method:
-
В коде есть строка с attachTrailerToVehicle ( bus, trailer1 ) Ниже добавьте: setElementParent ( trailer1, bus )
-
Можно попробовать setElementParent. Поезд сделать родителем и при его удалении вместе с ним будут удаляться вагоны. setElementParent ( trailer1, bus )
-
Maybe something like this? bindKey ( "fire", "down", function ( ) if getPedWeapon ( localPlayer ) == 43 then -- ... end end )
-
Good job guys. Keep up the good work!
- 28 replies
-
- mtasa
- legacy build
- (and 6 more)
-
Умер великий человек. Жаль, очень жаль.
-
It looks great nice work but i miss the old style a lot i'm used to it and i always been with it
- 84 replies
-
- mtasa
- forum stuff
-
(and 5 more)
Tagged with:
-
mapmanager. https://github.com/multitheftauto/mtasa ... n.lua#L113