C-Dogs SDL 0.5.6 introduced custom weapons, but apart from a sample campaign, the function was quite opaque.
Now there’s a walkthrough guide on the wiki, as well as comprehensive reference! Every weapon in C-Dogs SDL is made using the same way, so you can make fancy weapons like this booby trap: