I was wondering how to play music serverside for all the players in a level. This is what I have:
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat.starts("/play ")) {
play(@player.chat.substring(6));
}
}
Would this work?
PHP Code:
function onActionServerside() {
if (params[0] == "play") {
play(params[1]);
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat.starts("/play ")) {
setani("sit",NULL);
play(player.chat.substring(6));
triggerserver("gui",this.name,"play",player.chat.substring(6));
}
}