Phat Looser Posted March 4, 2009 Share Posted March 4, 2009 Hi there, After a long time of mindless babbling and sitting in the corner drooling, and of course after some scripting etc. I had the idea that MTA would be able to give scripters the opportunity to add key binds into the mta menu (I am talking about the menu you can see when you press "escape" and klick onto the button "settings" and go into the tab "controls", the place where you set things like "run forward, run backward, jump" - the control panel so to say). I am bad at explaining, so just think you are a player and just joined a deathmatch map. The mothafacking admin sais you can only reload when you mothafacking set the mothafacking reload key. So you mothafacking press escape and mothafacking go to the key settings, you mothafacking find a new option called "mothafacking kewl reload" there, and you click it and press "r". So you bound the r key to reload. Then you are tired of those mothafacking snipers on this mothafacking server, and you quit. When you join a neat RPG server after that, with a neat little girl admin, who wants to offer some cookie crisps - but you need to bind your key. So what do you do? The cute admin tells you that the fairyland can be accessed by pressing escape, clicking settings, going to the key settings and binding a key to "cooooooookies". You do as the admin asks, and the "mothafacking kewl reload", its gone! But there is a new option: "neat little cookie crisps". You bind "r" to it. Now you can mothafacking reload with "r" to kill those mothafacking snipers on the mothafacking kewl deathmatch server, or you can order neat cookies by pressing "r" in the fairyland server. Its just an idea, because until now I experienced some sort of "keybind chaos". Link to comment
robhol Posted March 4, 2009 Share Posted March 4, 2009 /binds /unbind Should do it. Ofc, if servers require you to bind commands, there's something wrong with them. Link to comment
Gamesnert Posted March 4, 2009 Share Posted March 4, 2009 How about some controls in the main menu like: mta_special_keybind1 mta_special_keybind2 mta_special_keybind3 mta_special_keybind4 mta_special_keybind5 ... And a server can use these? It would be good since there'd be less keybinding conflicts I guess. Link to comment
Mr.Hankey Posted March 4, 2009 Share Posted March 4, 2009 hm... i think something like that could be scripted. You could make a resource that has an exported function like "forcePlayerBindKey" so if you call that function you pass 3 the arguments player, description (e.g: "switching to next weapon in a vehicle.") and command (e.g: "vehicle_next_weapon"). Then the specified player get's a neat gui prompt that would say "Please bind a key for switching to next weapon in a vehicle., detect which key he pressed (can be done by looping through a table of keys every frame and checking it with getKeyState which is a bit unefficient though...) and bind this to the command "vehicle_next_weapon" by using executeCommandHandler ("bind", player, key, command) Edit: i hope that executeCommandHandler works with hard-coded commands Link to comment
Phat Looser Posted March 4, 2009 Author Share Posted March 4, 2009 No, more like... The key appears in THIS LIST (i uploaded the picture, imageshack comes later). This way the server owner does not need to write a whole set of functions for hotkeys. And, yeah, the server totally fails as soon as it needs hotkeys. I mean, who needs a "buy" key in an RPG server when he stands in front of a shopping cart and wants to buy some flowers? Or who needs to have an "drink energy drink" button in the middle of a battle? Noone. Typing "/drink_energydrink" or "/reload" is much faster then pressing a button... Just what did I think. Sorry. Link to comment
darkdreamingdan Posted March 4, 2009 Share Posted March 4, 2009 Just so you know, this actually existed at some point but was removed because it was buggy. (You might have even been in QA at the time ) BindKey had an extra "name" argument. Using this argument made the key appear in the MTA settings menu (with the specified name) and you were able to change the bind. It might be readded at some point. Link to comment
Phat Looser Posted March 5, 2009 Author Share Posted March 5, 2009 Just so you know, this actually existed at some point but was removed because it was buggy. (You might have even been in QA at the time )BindKey had an extra "name" argument. Using this argument made the key appear in the MTA settings menu (with the specified name) and you were able to change the bind. It might be readded at some point. Sounds good, thank you. I think I just figured out that "some point" means "after 1.0". I didn't have much time being at the QA, and that didn't change at all. I'm just too busy trolling people and doing stupid stuff. Link to comment
Mr.Hankey Posted March 5, 2009 Share Posted March 5, 2009 once you used bind the command and the bound key will be displayed in that list too and imo having to press a button after a prompt is more user friendly than needing to have an admin online that tells every new user to go there and do this and that Link to comment
Phat Looser Posted March 6, 2009 Author Share Posted March 6, 2009 The reason of my suggestion was no attemt to keep the admins awake 24 / 7, the reason was a identical handling of the hotkeys for all gamemodes available. The idea behind it was to make customizing easyer for both, the admin and the user, since the admin (scripter) only needs one command to create a new hotkey, and the user already knows where to search for that hotkey. And for those who don't get it, there is the F9 key. Link to comment
Recommended Posts