View Single Post
  #6  
Old 12-16-2015, 09:56 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by ffcmike View Post
It sounds as if playlooped() is being invoked from a level NPC rather than a weapon?
I am invoking it from a weapon npc actually, not a level npc. As well as invoking stopmusic() from a weapon npc too. The script I'm using is

PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
  
temp.song getmusicfilename(); // current song playing
  
if ( player.level == "desert2.nw" temp.song "stef49.mp3";
  if ( 
player.level == "level2.nw" temp.song "npulse_svrvilla.mp3";
  
  
// only play song if not already playing
  
if ( getmusicfilename() != temp.song) {
    
stopmusic();
    
playlooped(temp.song);
  }

Reply With Quote