How do I make a "pause" or "follow-up command" in console commands?

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


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.

Wrote this script just for you!

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
		LocalPlayer():ConCommand( query[1] )
	table.remove( query, 1 )

hook.Add( “Think”, “mcmd_think”, McmdThink )

local function DoCommands( _, _, args )

nextCmd = 0

local cmdStr = table.concat( args, " " )
query = string.Explode( ",", cmdStr )

concommand.Add( “mcmd”, DoCommands )

The console command is mcmd, split each command or delay with “,”.

] 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

Ragequit on k:
“FUCK DIS GAME” and then disonnect after 2 seconds.

bind k "mcmd say FUCK DIS GAME!, 2, disconnect"

[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”