Tag Archives: NPC Server

NPC – NPC Mass message to everyone

NPCServer Mass Message to everyone

function onActionServerSide()
{
if (params[0] == "send")
{
for ( temp.pl : allplayers )
{
if ( temp.pl.level == null) continue;

temp.pl.sendPM( params[1] );
temp.pl.chat = "Check (npcserver) pm!";
}
}
}

//#CLIENTSIDE
function onPlayerChats()
{
if (player.chat.starts(":npcmass"))
{
this.msg = player.chat.substring(8).trim();
triggerServer("gui", this.name, "send", this.msg);
}
}