Quote:
Originally Posted by Gambet
Your example is a little off since it would only set the animation for the player using the command.
|
It would but it would also play for everyone in the level, unless you mean that he wants to make it play for everyone on the server. If that's the case, then something like this should work:
PHP Code:
function onActionServerside(cmd,p1) {
if (cmd == "playmidi") {
for (pl: allplayers)
findPlayer(pl).setAni("playmidi",p1);
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (!(player.account in {"sssssssssss","Decus_Arilias"}))
return;
if (player.chat.tokenize()[0] == "playmidi")
triggerServer("gui",this,"playmidi",player.chat.tokenize()[1]);
}