freaky.psd 0 Posted July 16, 2020 Share Posted July 16, 2020 mp.gui.cursor.show(true, true); //Disables the players controls and shows the cursor mp.keys.bind(0x71, true, function () { // F2 mp.gui.cursor.visible = true; How can i add if i press F2 (0x71) key again, cursos becomes invisible? Link to post Share on other sites
pisarevvlad 0 Posted July 17, 2020 Share Posted July 17, 2020 let state = !mp.gui.cursor.visible; mp.gui.cursor.show(state, state); For example: mp.keys.bind(0x71, true, () => { let state = !mp.gui.cursor.visible; mp.gui.cursor.show(state, state); }); Link to post Share on other sites
LT.Steiner 1 Posted July 17, 2020 Share Posted July 17, 2020 This script is simple to use your idea => var ShowCursor = false; mp.keys.bind(0x71, false, function() { // F2 Key ShowCursor = !ShowCursor; if (ShowCursor){ mp.gui.cursor.show(true, true); } else { mp.gui.cursor.show(false, false); } }); Link to post Share on other sites
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