Cain_ 10 Posted November 6, 2010 I wish to disable the ability to type in multiplayer. Also if someone can explain what this really means. My previous note is incorrect now, you can use disableConversation and still use the group radio, at least in A2:OA ! http://community.bistudio.com/wiki/disableConversation does it mean you can talk through the microphone in the group channel but on no other? Thanks Cain Share this post Link to post Share on other sites
Cain_ 10 Posted November 8, 2010 Bump. Anyone got any ideas? Thanks! Share this post Link to post Share on other sites
st_dux 26 Posted November 8, 2010 "enableRadio false" might work. I know this disables usual radio messages along with sideChat, etc. Share this post Link to post Share on other sites
Worldeater 2 Posted November 8, 2010 Quick, dirty and untested... but might work: (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 in actionKeys 'Chat') then { true } else { false };"] Share this post Link to post Share on other sites
Cain_ 10 Posted November 9, 2010 "enableRadio false" might work. I know this disables usual radio messages along with sideChat, etc. Quick, dirty and untested... but might work: (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 in actionKeys 'Chat') then { true } else { false };"] Thanks alot guys will test this out! ---------- Post added at 12:51 PM ---------- Previous post was at 12:35 PM ---------- player disableConversation true;player setVariable ["BIS_noCoreConversations", true]; player disableRadio true player enableRadio false player (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 in actionKeys 'Chat') then { true } else { false };"] player disableRadio=1; player enableRadio=0; Nothing works :( Could it be that i need a public variable set or something? Simply meaning it will work once i put it on a dedicated server? Share this post Link to post Share on other sites
Cyborg11 10 Posted November 9, 2010 player (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 in actionKeys 'Chat') then { true } else { false };"] is false. The right code line is this which Worldeater posted already: (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 in actionKeys 'Chat') then { true } else { false };"] Share this post Link to post Share on other sites
Worldeater 2 Posted November 10, 2010 Right. I should also mention that this code probably won't do anything on a dedicated server. It's meant to be run on the clients. What it does is: it searches for the main display and attaches an event handler for key presses. Then every time someone hits a key the handler (that's the "if..." part) checks if it was the "chat" key. If so it simply does nothing and tells the engine to not investigate the event any further. Share this post Link to post Share on other sites
Cain_ 10 Posted November 10, 2010 Still not working. I tried to figure it out on biwiki. I tried to use AddEventHandler aswell. I tried both having init.sqs, init.sqf etc. Cant get it too work :) Some guys maybe just aint made to be scripting in Arma! Give me matlab! http://community.bistudio.com/wiki/displaySetEventHandler ---------- Post added at 09:00 PM ---------- Previous post was at 08:23 PM ---------- Got it working. Had to clean out my init file and just put in sleep 1; waitUntil {sleep 0.01; (!(isNull (findDisplay 46)))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 in actionKeys 'Chat') then { true } else { false };"] Thanks!!! Share this post Link to post Share on other sites
nuxil 2 Posted November 10, 2010 (edited) make sure you assign the displayevent handler after the main display is not null waitUntil {!(isNull (findDisplay 46))}; (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 in actionKeys 'Chat') then { true } else { false };"] edit: see you got it Edited November 10, 2010 by nuxil Share this post Link to post Share on other sites
Cain_ 10 Posted November 10, 2010 Another problem that it might been is that I can only have 1 script in my init.sqf. I also want to remove the map at start. But if i put the remove item line before the eventhandler map will be gone but ill be able to chat. And vice versa. Share this post Link to post Share on other sites
J-Guid 10 Posted July 5, 2011 and maby this avalible realize in client-side addon?! Share this post Link to post Share on other sites
.kju 3245 Posted July 9, 2011 Yes but a client side addon makes not much sense unless you can enforce it. The right approach is mission integration or a server side addon. Share this post Link to post Share on other sites
J-Guid 10 Posted September 4, 2011 USE the ACM! http://forums.bistudio.com/showthread.php?t=124071 Share this post Link to post Share on other sites