View Single Post
  #7  
Old 08-10-2011, 11:24 AM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Restyled it with fowplays new beautiful beautifier. Just thought I would post it. Think I just used it as a reason to use fowlplays beautifier.
PHP Code:
function onActionServerSide() {
  if (
params[0] == "Setsong") {
    
serverr.song = player.chat.substring(5);
  }
  if (
params[0] == "PlaySong") {
    for (
pl: allplayers) {
      
pl.triggerclient("weapon", this.name, "Play");
    }
  }
  if (
params[0] == "StopSong") {
    for (
pl: allplayers) {
      
pl.triggerclient("weapon", this.name, "Stop");
    }
  }
}

//#CLIENTSIDE
function onPlayerchats() {
  if (
clientr.isStaff) {
    if (
player.chat == "/play") {
      
triggerserver("gui", this.name, "PlaySong");
    }
    if (
player.chat == "/stop") {
      
triggerserver("gui", this.name, "StopSong");
    }
    if (
player.chat.starts("/set")) {
      
triggerserver("gui", this.name, "Setsong");
    }

    function 
onActionClientSide() {
      if (
params[0] == "Play") {
        
play(serverr.song);
      }
      if (
params[0] == "Stop") {
        
play("none.mid");
      }
    }
  }
} 
__________________
Reply With Quote