ConnorGuy Posted August 17, 2021 Posted August 17, 2021 (edited) So i keep getting this the second time i try to close my browser works the first time. https://imgur.com/a/sl8WY76 How can i have it run more then once? Client-side file that opens and closes the CEF. mp.events.add('client:closeATM', () => { browser.destroy(); mp.players.local.freezePosition(false); mp.game.ui.setMinimapVisible(false); mp.gui.chat.activate(true); mp.gui.cursor.show(false, false); }); The CEF main.js for the CEF functions. $('#closeATM').click(() => { mp.trigger('client:closeATM'); }); Edited August 17, 2021 by ConnorGuy Add more content.
dimas1k Posted August 17, 2021 Posted August 17, 2021 1. Show what you have on line 23; 2. Have you tried commenting out "browser.destroy ();", the error persists?
ConnorGuy Posted August 17, 2021 Author Posted August 17, 2021 (edited) Here is line 23; https://imgur.com/aLDzh7w I cant comment out the browser.destory as this will stop the CEF from closing. Edited August 17, 2021 by ConnorGuy Typos
J0NAH26 Posted August 17, 2021 Posted August 17, 2021 vor 40 Minuten schrieb ConnorGuy: Here is line 23; https://imgur.com/aLDzh7w I cant comment out the browser.destory as this will stop the CEF from closing. mp.events.add('client:closeATM', () => { if(browser) { browser.destroy(); ... ... } }); Try this 1
ConnorGuy Posted August 17, 2021 Author Posted August 17, 2021 Awesome, this resloved the issue, thanks very much!
ConnorGuy Posted August 17, 2021 Author Posted August 17, 2021 Well this works in till I leave the colshape and enter it again what sets my command to open the browser to be active then i get the error again.
MrPancakers Posted August 18, 2021 Posted August 18, 2021 Do 'browser = null' after you do browser destroy
ConnorGuy Posted August 18, 2021 Author Posted August 18, 2021 Thanks will give this ago when I can tonight, will update soon.
ConnorGuy Posted August 18, 2021 Author Posted August 18, 2021 So this stopped the error but now after closing the CEF then leaving and rentering the colshape the CEF wont close?
fl1k Posted August 18, 2021 Posted August 18, 2021 I also crash when I destroy CEF.... At this point it seems random when it works and when it doesn't
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now