• Из-за обновления GTA 5 (был добавлен новый патч) может временно не работать вход в RAGE Multiplayer.

    Ошибка: Ваша версия Grand Theft Auto V не поддерживается RAGE Multiplayer.
    ERROR: Your game version is not supported by RAGE Multiplayer.

    Данная ошибка говорит о том, что GTA V обновилась до новой версии (GTA Online тоже). Вам необходимо обновить саму игру в главном меню вашего приложения (Steam / Epic Games / Rockstar Games).
    Если после этого RAGE:MP все равно не работает - вам нужно дождаться выхода патча для самого мультиплеера (обычно это занимает от нескольких часов до нескольких дней).

    Новости и апдейты Rockstar Games - https://www.rockstargames.com/newswire/
    Статус всех служб для Rockstar Games Launcher и поддерживаемых игр: https://support.rockstargames.com/ru/servicestatus


    Grand Theft Auto 5 (+ GTA Online) последний раз были обновлены:
Кликни, чтобы узнать больше!

Harland David Sanders

🍔 ChefBurger
Команда форума
High developer
10 Сен 2020
4,080
3,234
259
Без комментариев.

JavaScript:
let trailers = {};
async function attachTrailerByVehicle(truck, trailer) {
    let reAttachInterval = setInterval(() => {
        if(mp.vehicles.exists(truck)) {
            if(truck.getVariable("TRAILER") != null){
                mp.events.call("Create::Trailer", truck, truck.position);
                if(mp.vehicles.exists(trailer)) {
                    trailer.setCanBeVisiblyDamaged(false);       //no damages
                    trailer.setCanBreak(false);                  //can break
                    trailer.setDeformationFixed();               //fixed deformation
                    trailer.setDirtLevel(0);                     //clear
                    trailer.setDisablePetrolTankDamage(true);    //disable fueltank damage
                    trailer.setDisablePetrolTankFires(true);     //disable fire fuel
                    trailer.setInvincible(true);                 //godmode
                }
                else {
                    if(reAttachInterval) clearInterval(reAttachInterval);
                }
            }
        }
        else {
            if(reAttachInterval) clearInterval(reAttachInterval);
        }
    }, 1000);
};
mp.events.add('Create::Trailer', (truck, position) => {
    if(trailers[truck.remoteId] != null) {
        setTimeout(() => {
            truck.attachToTrailer(trailers[truck.remoteId].handle, 1000);
        }, 50);
        return;
    }
  let trailer = mp.vehicles.new(mp.game.joaat(truck.getVariable("TRAILER")), position,
    {
        heading: truck.getHeading(),
        numberPlate: "TRAILER"
    });
    trailers[truck.remoteId] = trailer;
    if(trailer != null){
        setTimeout(() => {
            truck.attachToTrailer(trailer.handle, 1000);
            attachTrailerByVehicle(truck, trailer);
        }, 200);
    }
    else {
        mp.gui.chat.push("к сожалению, голем, твой трейлер не заспавнился...ты идиот");
    }
});

mp.events.add('entityStreamIn', (entity) => {
    if(entity && mp.vehicles.exists(entity)){
        if(entity.type == "vehicle"){
            if(entity.getVariable("TRAILER") != null){
                mp.events.call("Create::Trailer", entity, entity.position);
            }
        }
    }
});

mp.events.add('entityStreamOut', (entity) => {
    if(entity && mp.vehicles.exists(entity)){
        if(entity.type == "vehicle"){
            if(entity.getVariable("TRAILER") != null){
                if(trailers[entity.remoteId] != null) {
                  trailers[entity.remoteId].destroy();
                  trailers[entity.remoteId] = null;
                }
            }
        }
    }
});
 
Реакции: X-Clusiv

JJIGolem

Гений
High developer
BackEnd developer
19 Окт 2020
253
311
147

Harland David Sanders

🍔 ChefBurger
Команда форума
High developer
10 Сен 2020
4,080
3,234
259

JJIGolem

Гений
High developer
BackEnd developer
19 Окт 2020
253
311
147

JJIGolem

Гений
High developer
BackEnd developer
19 Окт 2020
253
311
147
теперь знаешь автора, добавь ссылку :)