On Zodiac I use text files, and onLevelFileUpdated() to allow people to edit the news.
When the news text file is updated, I store an updated copy in Control NPC. I.e:
PHP Code:
// Player Logs in
// Send them the News
function onPlayerLogin(pl) {
temp.news = findnpc("Control-NPC").news;
pl.triggerclient("-YourNewsSystem", "thegoodword", temp.news);
}
// News is updated
function onLevelFileUpdated(filename) {
if (filename == "news/news.txt") {
findnpc("Control-NPC").news.loadlines("levels/" @ filename);
updateEveryone();
}
}
// Send Everyone the News
function updateEveryone() {
temp.news = findnpc("Control-NPC").news;
for (temp.a: allplayers) {
temp.a.triggerclient("-YourNewsSystem", "thegoodword", temp.news);
}
}