Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   can't seem to get stopsound() to work (https://forums.graalonline.com/forums/showthread.php?t=76253)

Cherrykao 08-13-2007 07:49 AM

can't seem to get stopsound() to work
 
im using a gani script to play music for all players and this is done by setting a gani to one of their attributes. the gani script is below:

PHP Code:

SCRIPT
... some code

  
if (temp.play == 0) {
    
stopsound(temp.playm);
  } else {
    
play2(temp.playmplayer.xplayer.ytemp.vlm);
  }

... 
some code
SCRIPTEND 

The gani script will play music for the specific individual, but when i use the stop command in the wNPC, the music wont stop. I even tried it CLIENTSIDE on the wNPC too.

Chompy 08-13-2007 01:12 PM

you can try stopmidi()
But, you can't stop the gani form playing via a weapon npc, not that I know of.
You could change the attr to something like -1 etc.. and check in a timeout loop in the gani script..

zokemon 08-13-2007 02:31 PM

Yeah do stopmidi() for stopiing mp3s, midis, aac streams, etc.

Cherrykao 08-13-2007 05:22 PM

thanks; it works now. i don't even know why i didn't even think about changing the attribute. i tried reading the client's flag in a timeout, but not the attributes.


All times are GMT +2. The time now is 04:42 PM.

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