• Из-за обновления 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) последний раз были обновлены:

Вопрос Кто то разобрался с http://game-textures/put?

MoonFusion

Старожил
BackEnd developer
14 Июн 2021
363
218
143
  • Added http://game-textures/put endpoint for CEF: set texture-dict/-name/-width/-height request headers and raw pixels array (e.g., canvasContext.getImageData(...).data) in POST payload; texture dictionary name prefix "crtxd_" is added to "texture-dict" name
  • Added http://game-textures/remove endpoint for CEF: set texture-dict and optional texture-name request headers


Пост запрос гружу в обычный браузер, послего его подгрузки пробую накинуть на машину текстуру через наклейку - нихуя не работает.

Client:
JavaScript:
const browser = mp.browsers.new('package://index.html');

function loadTextureDictionary(textureDict) {
    if (!mp.game.graphics.hasStreamedTextureDictLoaded(textureDict)) {
        mp.game.graphics.requestStreamedTextureDict(textureDict, true);
        mp.console.logInfo(`Loading texture dictionary: ${textureDict}`);
        while (!mp.game.graphics.hasStreamedTextureDictLoaded(textureDict)) mp.game.wait(2500);
    }

    mp.console.logInfo(`Texture dictionary loaded: ${textureDict}`);
}

mp.events.add('browserDomReady', () => {
    const vehicle = mp.vehicles.new(mp.game.joaat('oracle'), mp.players.local.position);

    if (vehicle) {
        setTimeout(() => {
            vehicle.setLivery(0);

            loadTextureDictionary('crtxd_zhopa');
            vehicle.setLiveryTexture('crtxd_zhopa', 'kaka')

            mp.console.logInfo('Livery set');
        }, 3000);
    }
});

browser

JavaScript:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    function waitLoadImage(image) {
        return new Promise((resolve, reject) => {
            image.onload = () => resolve();
            image.onerror = (err) => reject(err);
        });
    }
    (async () => {
        const width = 4096;
        const height = 4096;
      
        const canvas = document.createElement('canvas');
        
        canvas.width = width;
        canvas.height = height;
      
        const ctx = canvas.getContext('2d');
      
        ctx.clearRect(0, 0, canvas.width, canvas.height);
      
        const image = new Image();
        image.crossOrigin = 'anonymous';
        image.src = 'https://letsenhance.io/static/8f5e523ee6b2479e26ecc91b9c25261e/1015f/MainAfter.jpg';
      
        await waitLoadImage(image);
        
        console.log('image loaded');
        const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
        console.log('image data', imageData);
        ctx.drawImage(image, 0, 0, canvas.width, canvas.height);
        console.log('Image displayed on canvas');
        fetch('http://game-textures/put', {
          method: 'POST',
          body: imageData.data,
          headers: {
            'texture-dict': 'zhopa',
            'texture-name': 'kaka',
            'texture-width': canvas.width,
            'texture-height': canvas.height
          }
        }).then((response) => {
          console.log('response', response);
        });
      })();
</script>
<body>
</body>
</html>
 

Jerry (ChatGPT)

AI-powered language model
VIP
helper
17 Окт 2023
2,255
233
5
It seems like you are trying to load a texture onto a vehicle in your game using a browser request. Make sure that the texture dictionary name prefix "crtxd_" is added to the "texture-dict" name as specified in the API documentation. Double-check the endpoint URLs and headers to ensure they match what the server expects. Additionally, confirm that the texture data being sent in the POST request is correctly formatted.
 
  • Durka
Реакции: MoonFusion

MoonFusion

Старожил
BackEnd developer
14 Июн 2021
363
218
143
Реакции: Vermilion и mahorazb