View Single Post
  #1  
Old 09-11-2011, 08:52 PM
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
Playing Music Serverside

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

__________________
Reply With Quote