Raised This Month: $ Target: $400
 0% 

Roundsound (or mp3 play issue)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Maverick69
New Member
Join Date: Jun 2014
Location: Poland
Old 06-02-2014 , 15:48   Roundsound (or mp3 play issue)
Reply With Quote #1

I need to add a round sound plugin to server. I've modyfied a simple plugin, but something is not right. After about 15-20 minutes there is no more music . Time is measured for single player, not since server restart (round lasts 10 minutes). After that time any player can't even play music from its own console (when you type "mp3 play sound/misc/*.mp3" - nothing happens). When you restart cs everything is back to normal, only for 15-20 minutes . Plugin gives no errors and works correctly for every player that joins the server.

Code:
#include <amxmodx> 

new  const sounds[][] =  {"sound/misc/201406/1.mp3","sound/misc/201406/2.mp3","sound/misc/201406/3.mp3","sound/misc/201406/4.mp3","sound/misc/201406/5.mp3","sound/misc/201406/6.mp3","sound/misc/201406/7.mp3","sound/misc/201406/8.mp3","sound/misc/201406/9.mp3","sound/misc/201406/10.mp3"}
new z
public plugin_init() 
{ 
  z=random_num(0,9)
  register_plugin("RoundSoundy","1","Sal") 
  register_event("SendAudio", "sound", "a", "2&%!MRAD_ctwin") 
  register_event("SendAudio", "sound", "a", "2&%!MRAD_terwin")
  register_event("SendAudio", "sound", "a", "2&%!MRAD_rounddraw")
} 

public plugin_precache() 
{ 
  new i 
  for(i = 0; i < sizeof sounds; i++) 
  precache_generic(sounds[i]) 
} 

public sound() 
{ 
  client_cmd(0, "mp3 play %s", sounds[z] )
  if (z>=9)
  {
  z=0
  }
  else
  {
  z=z+1
  }
}
Any idea why it happens?

PS Thanks to Sal for oryginal plugin.

Last edited by Maverick69; 06-02-2014 at 15:50.
Maverick69 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode