Jump to content

Remmi_Jefferson

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by Remmi_Jefferson

  1. 49 минут назад, mDenis16 сказал:

    use browser.execute(``);

        'GetVar' : (test_server) => {
            test_client = test_server;
            mp.gui.chat.push('Значение: '+test_server)
            var hud = mp.browsers.new('package://hud/index.html');
            hud.execute(`document.getElementById("level").innerHTML = ${test_client};`);
         }

     

    If you replace $ {test_client} with "any text", then everything works, but does not want a variable

  2. В 17.12.2019 в 20:11, mbsnero сказал:
    
    // Client Side
    mp.events.callRemote("sendDataToServer", data);
    
    // Server Side
    mp.events.add("sendDataToServer", function (player, data) {
      // Something do with data & player variables
    });

     

    //client
    mp.events.callRemote("PlayerData", player);
    mp.gui.chat.push(player.age);
    //server
    mp.events.add({
        'PlayerData' : player => {
            player.age = "test"
        });

    So?

  3. if(notifications)
    {
        notifications = null;
    }
    else{
        var notifications = mp.browsers.new("package://notifications/index.html");
        setTimeout(() => {
            notifications.destroy();
            notifications = null;
        }, 5000)
    }

    Hi, the browser is called only once, the second time nothing happens

  4. 2 минуты назад, Xabi сказал:

    The null should be assigned AFTER the destroy() line, don't just replace it.

    That's what @MrPancakers told you to do and how it's supposed to work.

    if(notifications)
    {
        notifications = null;
    }
    else{
        var notifications = mp.browsers.new("package://notifications/index.html");
        setTimeout(() => {
            notifications.destroy();
            notifications = null;
        }, 5000)
    }

     

    Does not work

  5. if(notifications)
    {
        notifications = null;
    }
    else{
        var notifications = mp.browsers.new("package://notifications/index.html");
        setTimeout(() => {
            notifications.destroy();
            notifications = null;
        }, 5000)
    }

    So?

  6. Hi, the browser is called only once, the second time nothing happens

     

    if(notifications)
    {
        notifications.destroy();
    }
    else{
        var notifications = mp.browsers.new("package://notifications/index.html");
        setTimeout(() => {
            notifications.destroy();
        }, 5000)
    }

     

  7. Hi, I need to do authorization in the browser, but how can I transfer the received input data to input from the client to the server?

×
×
  • Create New...