LT.Steiner Posted March 23, 2020 Posted March 23, 2020 (edited) Hello every body, I set up some actions on "K", "L", "C" and some keys that I want to set them for future, when I'm chatting, these actions will work, how can i disable actions when chatting? Edited March 23, 2020 by LT.Steiner
eqlient Posted March 23, 2020 Posted March 23, 2020 you can make a variable that will be assigned when you open a chat and then add a check on that variable to your actions
LT.Steiner Posted March 24, 2020 Author Posted March 24, 2020 @eqlient I'm beginner, can you give me any sample(please)?
LT.Steiner Posted March 26, 2020 Author Posted March 26, 2020 can someone please pay attention on me??
attacking Posted March 26, 2020 Posted March 26, 2020 when somebody press T check if deafult variable that you made is false then set the variable as true and then when he press ENTER set that variable to false and check if chat is close then let those key work.
LT.Steiner Posted March 29, 2020 Author Posted March 29, 2020 @attacking can you give me a sample code? i wrote cursor visible code in client that lock camera moves, now i want to disable key binds when chatting, I'm beginner, can you give me something?
attacking Posted March 30, 2020 Posted March 30, 2020 (edited) this example is for js client-side @LT.Steiner global.chatopened = false; mp.keys.bind(0x54, true, (player) => { /// T Key if (chatopened === true) return; chatopened = true; }); mp.keys.bind(0x0D, true, (player) => { /// ENTER Key if (chatopened === false) return; chatopened = false; }); mp.keys.bind(0x4B, true, (player) => { /// a random key if (chatopened === true) return; // add this to all of your keys code mp.events.callRemote('Lock_Vehicle_Key'); }); i'm gonna send some tutorial video to you check your pv. Edited March 30, 2020 by attacking 1
LT.Steiner Posted March 30, 2020 Author Posted March 30, 2020 @attacking Thank you my Brother, I appreciate it ❤️
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