Crow's spot on from fixing your existing code.
Using (npcserver) PM's for mass messages suck and if everyone can do it, it'll just become a nuisance to the point people are ignoring the (npcserver).
There might be a function to open a mass message window but this also works:
PHP Code:
//#CLIENTSIDE
function onCreated() {
openMassPM();
}
function openMassPM() {
if (graalversion >= 5.324) {
(@"-Playerlist_v6").openPMWindow(allplayers, false);
} else {
(@"-Playerlist").openPMWindow(allplayers, false);
}
}