tosfera Posted December 12, 2016 Share Posted December 12, 2016 I've been working with binding keys quite a lot, but this is currently destroying my brain. Lots of other people have been walking against this problem and I'm trying to find a solution, it can't be that hard! My setup is as following: User gets a UI -> fills in a key to bind a chat to -> using triggerServerEvent to bind the key for the user + some sql saving After a successful attempt of saving the new button for the user, I'm trying to unbind the key from the chatbox-styled function isn't unbinding. If I'm simply unbinding it with runcode directly in runtime, it's returning a true but it's not unbinding. I've seen several reports about this on the bugtracker but none of them were taken note off. Is there a work around or should I simply ask my users to use a MTA-based command to unbind their keys? thanks in advance. Link to comment
Bonsai Posted December 12, 2016 Share Posted December 12, 2016 Wasn't it like you can only unbind all custom chatbox keys? bindKey("g", "down", "chatbox", "Global") bindKey("c", "down", "chatbox", "Clan") bindKey("l", "down", "chatbox", "Language") unbindKey("g", "down", "chatbox") --unbinds them all? Link to comment
tosfera Posted December 13, 2016 Author Share Posted December 13, 2016 Well I've been trying that too, but that didn't really work out. If it does, that also means that you have to rebind actual other functions on that key with chatboxes. Correct? Link to comment
tosfera Posted December 13, 2016 Author Share Posted December 13, 2016 (edited) Can't edit my post, what a joke. So that'll be a double post.. anyway, unbinding the entire key doesn't work. Any chance you got another idea? Edited December 13, 2016 by tosfera Link to comment
Bonsai Posted December 13, 2016 Share Posted December 13, 2016 I remember a bug report about that problem. If you bound 4 chatbox keys, then unbind one, all will be gone. But they are not actually gone, they reappear once you bind another key again. If you do it without scripting, it works as expected: If you are ingame, and you use "/bind <key> chatbox Inputtag", you can add your own chatbox bind without any script functions. Thats not so special yet, but if you unbind that key again, the bind is gone. If you bound several custom chatbox inputs, you can actually unbind them one by one. Therefore, I think this is a problem thats still not fixed. Link to comment
tosfera Posted December 13, 2016 Author Share Posted December 13, 2016 Ya I assume it's a bug in MTA because this has been killing me slowly. guess I'll see what they do with the reports. Link to comment
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