• Remove/Disable 'disconnect' command?
    4 replies, posted
  • Avatar of Chrik
  • I have tried to look around but did not find anything that could answer my question. I would like to know, is it possible, anyhow, even though it might be a binary module, or lua, to remove/disable the 'disconnect' command? I am working on a bit creepy gamemode, and if the sanity got lower than 20% then the player should not be able to use the disconnect command for around 30 seconds.
  • Avatar of Wizard of Ass
  • [QUOTE=Chrik;36261866]I have tried to look around but did not find anything that could answer my question. I would like to know, is it possible, anyhow, even though it might be a binary module, or lua, to remove/disable the 'disconnect' command? I am working on a bit creepy gamemode, and if the sanity got lower than 20% then the player should not be able to use the disconnect command for around 30 seconds.[/QUOTE] Nope, blocked. But there is some kind of exploit when opening the chatbox.
  • Avatar of S W
  • Are you talking about not allowing the player to disconnect or not allowing the player to run the 'disconnect' command in console. If it is the latter then I believe you can just use [lua] function GM:PlayerBindPress( ply, bind, pressed ) if string.find( bind, "disconnect" ) then return true end end [/lua] Although you shouldn't be stopping a player from disconnecting
  • Avatar of Amokov
  • You can block the run of any console command in a binary module, but since they can disconnect by many means other than console command, i would just use SW's hook, and maybe catch quit as well.