Chat commands

I know how to create simple chat commands, but i have no idea how you would make it to require arguments. Does anyone have an idea?

Google ‘Garry’s Mod chat commands’ and you will find infinite results
http://forum.facepunch.com/showthread.php?t=1501160
http://forum.facepunch.com/showthread.php?t=1295161
http://forum.facepunch.com/showthread.php?t=1412976
http://forum.facepunch.com/showthread.php?t=1307963

To ‘require’ arguments, you just need to use the code in any of the above links to get a table of arguments, and then do the same thing you do with any variable to verify it.



if args[1] == nil or args[1] ~= "Whatever you need it to be" then
    chat.AddText( "This command is required" )
end


Thanks for the fast reply, I didn’t find those posts for some reason even though i searched for the same.