Hello,
First, if you want it to be heard by all players use
es_emitsound command. The syntax is quite similar to es_playsound. I'll also update my tutorial with it some time soon.
About the custom sounds... They work same way as normal sounds as long they exist on server and on player (server can force players with cl_allowdownload 1 to download those files on connect).
But with your commands the problem is propably the userid. If you haven't created a variable of your own, there will not be a server_var(userid) (?). Try to replace it with event_var(userid) and see if it will fix your issue.
spawncmd = "es_delayed 0.5 es_playsound event_var(userid) custom/dt/dtspawn.wav 0.9;es wcs_restrict(userid)knifeonly;"
deathcmd = "es_delayed 0.5 es_playsound event_var(userid) custom/dt/dtspawn.wav 0.9"Here I changed the userid for you. Try that out, because otherwise the command looks just fine (if the path custom/dt/dtspawn exists and your file is a wave sound file).
Please, contact me on this topic or with private message if you still can't get it working.
Thanks and updates for tutorials (and new tutorial) is coming immediately when I can get time to finish them.