I know its fairly simple, but still useful.
Any feedback is appriciated.
PS: for players to broadcast there account needs to be in this.allowed.
PHP Code:
function onActionServerSide() {
if (params[0] == "send") {
for (temp.pl: allplayers) {
temp.pl.triggerclient(this.name, "recieved", params[1]);
}
}
}
//#CLIENTSIDE
function onCreated() {
this.allowed = {
"Graal780374"
};
}
function ChatBar.onAction() {
if (ChatBar.text.starts("/adminmessage")) {
if (player.account in this.allowed) {
triggerserver("weapon", this.name, "send", ChatBar.text.substring(14));
shared.chat("");
}
}
}
function onActionclientside() {
if (params[0] == "recieved") {
shared.adminMessage("<center><b><font size=15>Broadcast Message</b></font><br><font size=14>" @ params[1]);
}
}