The write_* basically fills in what you want the SVC_TEMPENTITY to be.
There's a list somewhere around here if you're not sure what they are. For that, I'll list what each of the bytes/shorts do.
Code:
write_byte(17) // What kind of tempentity it is, in this case a regular ol' sprite
write_coord(userorigin[id]) // X Coordinate
write_coord(userorigin[id]) // Y Coordinate
write_coord(userorigin[id]) // Z Coordinate
write_short(0) // The spr's name. Giving it 0 means it has none...
write_byte(YourScaleHere) // The scale of the sprite (in 0.1s)
write_byte(brightnessofthesprite) // And, well, the brightness of the sprite.