Sarrum

Members
  • Content Count

    576
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Sarrum

  • Rank
    Mack
  • Birthday June 10

Details

  • Location
    RF, Moscow

Recent Profile Visitors

1,090 profile views
  1. Удали 6-ую строку и if getPlayerTeam ( player ) == "Машинист" then замени на: if getPlayerTeam ( player ) == teamjob then
  2. @mehmet isElement - проверяет валидность элемента (переданное значение элемент/ не элемент), getElementData - для получения даты элемента (которая задана до этого функцией setElementData) с определенным ключом. У них совершенно разные предназначения. Так как мы добавляем данные в таблицу, нам нужно событие onElementDestroy, которое сработает при уничтожении элемента (у нас при удалении транспорта), чтобы удалить этот элемент (транспорт) из таблицы. В противном случае могут возникнуть проблемы с утечкой памяти.
  3. Если вдруг кто столкнется с подобной проблемой, как вариант: 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 )
  4. Sarrum

    Random crash

    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.
  5. Sarrum

    Random crash

    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.
  6. Sarrum

    engineApplyShaderToWorldTexture For Vehicles

    You can find texture name with https://wiki.multitheftauto.com/wiki/Shader_examples#Texture_names
  7. I think you should contact the server owner about your issue.
  8. Sarrum

    Lua module installing?

    https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions#UTF8_Library
  9. Sarrum

    MTA is crashing

    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:
  10. В коде есть строка с attachTrailerToVehicle ( bus, trailer1 ) Ниже добавьте: setElementParent ( trailer1, bus )
  11. Можно попробовать setElementParent. Поезд сделать родителем и при его удалении вместе с ним будут удаляться вагоны. setElementParent ( trailer1, bus )
  12. Sarrum

    Need help to save player's screenshot.

    Maybe something like this? bindKey ( "fire", "down", function ( ) if getPedWeapon ( localPlayer ) == 43 then -- ... end end )
  13. Sarrum

    Память о Adamix'e

    Умер великий человек. Жаль, очень жаль.
  14. Sarrum

    MTA Forum is back online and with a new look!

    It looks great nice work but i miss the old style a lot i'm used to it and i always been with it