Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Old Scripting Engine (GS1) (https://forums.graalonline.com/forums/forumdisplay.php?f=154)
-   -   Jukebox help (https://forums.graalonline.com/forums/showthread.php?t=75211)

LoneAngelIbesu 07-09-2007 11:32 PM

Jukebox help
 
I'm by no means a scripter, but I did make this NPC. It's your basic jukebox. Only plays one song at a time, simple commands, and all that stuff.

The problem I'm having is that I expected everybody to be able to hear the music being played, but so far, only the person who started the music can hear it. How would I go about making it so EVERYONE can hear the music?

PHP Code:

if (playertouchsme) {
  
toweapons Jukebox;
}

if (
weaponfired) {
  
say2 "/play url" to play#b
  
"/stop" to stop#b
  
url must end in mp3/wav/midi;
}

if (
playerchats){
  if(
startswith(/play,#c)) {
    
tokenize #c;
    
play #t(1);
    
setplayerprop #c,;
  
}
}

if (
playerchats){
  if(
strequals(#c,/stop)){
    
stopmidi;
    
setplayerprop #c,;
  
}


PS:
I know. GS1 = ew (in the words of Inverness)

theHAWKER 07-10-2007 04:06 AM

dose the music actualy play though?

and if u wanted it to play for everyone you would need systems, and stuff.
but i think that it would only resalt in music being played when people wont want it to...

LoneAngelIbesu 07-10-2007 04:15 AM

Yes, it works perfectly, but only for the person PLAYING the music.

godofwarares 07-10-2007 04:52 AM

Quote:

Originally Posted by LoneAngelIbesu (Post 1327476)
Yes, it works perfectly, but only for the person PLAYING the music.

Well duh. >.<
You gotta do a triggeraction to the server, and then to the client of people in the level (or use a gani script) to play it for everyone.

Twinny 07-10-2007 08:40 AM

You said 'everyone' so I assume you are creating this on a server. Thus DO NOT use toweapons ;. Have a nat create it in RC and use addweapon() instead.


All times are GMT +2. The time now is 03:02 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.