Jump to content

Clientside CEF randomly crashing


Recommended Posts

Posted

Fixed by rewriting the entire code, literally nothing changed, just loading jquery from local instead of google cdn. Cool.

Posted
В 19.08.2021 в 00:30, fl1k сказал:

Clientside CEFs keep crashing the game on random occurances (same code)

I ran the server, submitted Login CEF, it closed. I shut the server down, I run it again, I press login and I crash. (jquery used inside)

[code]

mp.events.add('SendLoginData', (password) => {
    mp.events.callRemote('client:LoginData', password);
});
 
var loginBrowser = null;
 
mp.events.add('server:OpenLoginPage', () => 
{
    mp.players.local.freezePosition(true);
    mp.gui.cursor.show(truetrue);
    mp.gui.chat.activate(false);
    mp.game.ui.displayRadar(false);
    loginBrowser = mp.browsers.new('package://Auth/Login/Login.html');
});
 
mp.events.add('server:CloseLoginPage', () => 
{
    mp.players.local.freezePosition(false);
    mp.gui.cursor.show(falsefalse);
    mp.gui.chat.activate(true);
    mp.game.ui.displayRadar(true);
    if(loginBrowser)
    {
        loginBrowser.destroy();
        loginBrowser = null;
    }
});
[/code]
 
nulled browser like Panckakers said but no difference
 
<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="../styles.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script>
             $(document).ready(function(){
              $("#loginButton").click(function(){
                if($("#passwordText").val().length > 3)
                {
                    mp.trigger('SendLoginData', $("#passwordText").val());
                }
                // alert
              });
            });
        </script>
    </head>
 
    <body>
        <div id="container">
            <form id="authForm">
                <div class="rows">
                    <div class="row">
                        <h1>Welcome! Please login.</h1>
                    </div>
                    <div class="row">
                        <input id="passwordText" class="inputbox" placeholder="Password" type="password">
                    </div>
                    <div class="row">
                        <input id="loginButton" type="submit" value="Login">
                    </div>
                </div>
            </form>
        </div>
    </body>
 
</html>

show the structure of folders and files, and where is what code is, you most likely do not correctly call events.

Posted
14 hours ago, dimas1k said:

show the structure of folders and files, and where is what code is, you most likely do not correctly call events.

crashing went away, I will reply to this topic if it occurs again

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...