OK, first of all, map.PlaySound() requires an argument that is a
string (a sequence of characters) holding the sound's filename. Nothing else will work. You can do it directly, just like you did:
map.PlaySound("AIRSIREN.ogg");
Or pass it as a variable with string type, which stores the filename:
string mySirenSound = "AIRSIREN.ogg";
map.PlaySound(mySirenSound);
The stuff you did:
sound = locker.Proto.SoundId;
map.PlaySound(sound);
doesn't work, because locker.Proto.SoundId isn't even a string! It has uint8 (unsigned 8-bit integer) type - which means it can hold ONLY numbers in a range from 0 to 255. It can't be used to store a filename and it doesn't magically identify them. I don't even know what's the result of an expression like this (sound = locker.Proto.SoundId), maybe an empty string or something like "48" but not any meaningful filename for sure. That's why it doesn't play.
You should check out the 2238 LockerOpen code again. It does something slightly different:
sound[7] = item.Proto.SoundId;
Notice the 7 in square brackets. It means "8th character of the sound string". Why 7 means 8th? Because the index starts from 0 (sound[0] means the first character of the sound string, sound[1] the second character etc).
So the code doesn't replace the whole sound string, only 8th character of it. What does it replace with? With a character which has
ASCII code equal to item.Proto.SoundId. You have to look it up in the ASCII table.
So in case of "SODOORS
A.ACM" it replaces the bold "A" with a character which ascii code is equal to the locker.Proto.SoundId. I guess it just happens that the door filenames sounds have only different the last character, so in their case item.Proto.SoundId is used to store this character's ASCII code. It's a bit primitive way to do it (to put it mildly), but it works for original Fallout door sounds.
BTW, I just realized it probably didn't work in your SDK (before you made any changes) because of added UNICODE and changes in string handling, that happened in FOnline some time ago. That most likely would brake the "sound[7]" crap.
It might be fixed in later revisions of the script, so just check later version of lockers.fos.