Console command

Can you tell me how to create a console command for my gmod (darkrp) server, i saw a server that you look at one of your props, type “weldall” in console and it welds all of your props instead of having to weld 1 by 1 with the weld too.