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");
}
}
}
}