• How do I make a "pause" or "follow-up command" in console commands?
    3 replies, posted
  • A pause, or something that makes the previous command follow up the next one for instance, a ragequit command " say FUK DIS GAME! [insert pause or something here] disconnect " I've seen it before but totally forgot how to do it help?
  • Would be a good idea to read the sticky before posting - you're in the wrong section for this kind of stuff. Go to Help & Support.
  • But to make another thread pointless, wait was removed so you cannot. Use/Learn lua to do it.
  • Avatar of Thermadyle
  • Wrote this script just for you! [lua] local query = {} local nextCmd local function McmdThink() if not query[1] then return end if ( nextCmd or 0 ) < CurTime() then local delay = tonumber( query[1] ) if delay then nextCmd = CurTime() + delay else LocalPlayer():ConCommand( query[1] ) end table.remove( query, 1 ) end end hook.Add( "Think", "mcmd_think", McmdThink ) local function DoCommands( _, _, args ) nextCmd = 0 local cmdStr = table.concat( args, " " ) query = string.Explode( ",", cmdStr ) end concommand.Add( "mcmd", DoCommands ) [/lua] The console command is mcmd, split each command or delay with ",". [code] ] mcmd say I, 1, say really, 1, say do, 1, say like, 1, say pie Therma: I Therma: really Therma: do Therma: like Therma: pie [/code] Ragequit on k: [i]"FUCK DIS GAME" and then disonnect after 2 seconds.[/i] [code] bind k "mcmd say FUCK DIS GAME!, 2, disconnect" [/code] [editline]22nd February 2012[/editline] Does not work if you are in menu-state. [editline]22nd February 2012[/editline] Oh right, goes in "garrysmod/garrysmod/lua/autorun/client/mcmd.lua"