Try having your semicolons and brackets consistent. If you use semicolons, use it for the entire plugin. Also, blank lines don't affect the compiler at all, they just make the code easier to read. Also, you might want to add a task in place of your spawn to verify that they actually did get spawned.
Try replacing your spawn(id); with this
Then, add this to the file
This is because there is sometimes a glitch in the HL engine that causes the player not to be spawned on the first call.