View Single Post
  #1  
Old 09-18-2011, 10:32 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Admin Message System

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.plallplayers) {
      
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]);
  }

__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote