[Lua] Удаление модельки авто

_RaDley_

Известный
Автор темы
92
31
Версия MoonLoader
.026-beta
Здравствуйте, подскажите пожалуйста, можно ли удалить модель авто по ее айди и как это сделать?
 
Решение
Lua:
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('delveh', function(arg)
        if tonumber(arg) ~= nil then
            result, vehHandle = sampGetCarHandleBySampVehicleId(tonumber(arg))
            if result then
                deleteCar(vehHandle)
            end
        end
    end)
    while true do
        wait(0)
    end
end

chapo

🫡 В армии с 17.10.2023. В ЛС НЕ ОТВЕЧАЮ
Друг
8,767
11,218
Lua:
function main()
    while not isSampAvailable() do wait(0) end
    sampRegisterChatCommand('delveh', function(arg)
        if tonumber(arg) ~= nil then
            result, vehHandle = sampGetCarHandleBySampVehicleId(tonumber(arg))
            if result then
                deleteCar(vehHandle)
            end
        end
    end)
    while true do
        wait(0)
    end
end
 
  • Нравится
Реакции: _RaDley_