There are some spawning scripts in the editor depot. You could make a trigger that when activated would execute one of these respawn scripts. You could also put a createunit command in the trigger, but this would only make one unit at a time. Eg. in the on activation filed:
"SoldierWB" createUnit [getMarkerPos "barracks", groupAlpha
For MP make sure you make also have game logic called "server" and this line at the begining of the script:
?!(local server) : exit
If you put the createunit command directly in the trigger for MP you will have to put in the condition field of the trigger:
this and (local sever)
Hope this helps (you might want to double check my command syntax also).