1. Post #1

    November 2011
    17 Posts
    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?

  2. Post #2
    Gold Member
    Jackpody's Avatar
    August 2010
    2,597 Posts
    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.

  3. Post #3
    JamieH is a retarded bitch <3
    Pantho's Avatar
    July 2008
    2,183 Posts
    But to make another thread pointless, wait was removed so you cannot.

    Use/Learn lua to do it.

  4. Post #4
    Gold Member
    Thermadyle's Avatar
    January 2011
    363 Posts
    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
    			
    		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 )
    

    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
    Ragequit on k:
    "FUCK DIS GAME" and then disonnect after 2 seconds.
    Code:
    bind k "mcmd say FUCK DIS GAME!, 2, disconnect"
    Edited:

    Does not work if you are in menu-state.

    Edited:

    Oh right, goes in "garrysmod/garrysmod/lua/autorun/client/mcmd.lua"