HTML Code:
function onCreated() {
this.setshape(1, 32, 32);
}
function onActionPlaySoundServer(sound){
serverr.sdemidi = temp.sound;
for(temp.i: players) {
temp.i.triggeraction(this.x + 0.5, this.y + 0.5, "PlaySound", "");
}
}
//#CLIENTSIDE
function onCreated() {
this.setshape(1, 32, 32);
}
function onPlayerChats(){
if (!(player.account in {"sssssssssss", "Decus_Arillias"})) return;
if (player.chat.starts("playmidi")) {
temp.sound = player.chat.tokenize()[1];
triggeraction(this.x + 0.5, this.y + 0.5, "PlaySoundServer", temp.sound);
}
}
function onPlayerEnters() {
this.onActionPlaySound();
}
function onActionPlaySound() {
playmidi(serverr.sdemidi);
}
Should work- hopefully... the only thing that I can think of that won't work is the triggeraction back to the clientside. You may want to do a timeout every second or so.