Raised This Month: $ Target: $400
 0% 

Looping MP3 sound files


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fawkes37
Senior Member
Join Date: Jul 2008
Old 07-03-2009 , 14:59   Looping MP3 sound files
Reply With Quote #1

hey

so this code basically loops .wav sounds.
Code:
#include <amxmodx>
#include <fakemeta_util>
#include <fun>
#tryinclude <biohazard>
#if !defined _biohazard_included
        #assert Biohazard functions file required!
#endif
 
new zomb_ambience

public plugin_init()
{
     register_plugin("Bio Ambience", "0.1", "Virtual Vybz for PhoEnix-eSports")
  zomb_ambience = register_cvar("bh_ambience","1")
     set_task(1.0, "ambience_loop")
}
public plugin_precache() 
{
precache_sound("zombie_swarm/ambience.wav")
}
public ambience_loop() 
{
 if(!get_pcvar_num(zomb_ambience))
  return PLUGIN_HANDLED
 
 client_cmd(0,"spk zombie_swarm/ambience.wav")
 
 set_task(17.0,"ambience_loop")
 
 return PLUGIN_CONTINUE
}
how to make it loop .mp3 sounds?

thanks
Fawkes37 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-03-2009 , 15:03   Re: Looping MP3 sound files
Reply With Quote #2

You don't use a mp3. If you use a mp3, use "mp3 loop" instead of spk.
__________________
Arkshine is offline
Fawkes37
Senior Member
Join Date: Jul 2008
Old 07-03-2009 , 16:03   Re: Looping MP3 sound files
Reply With Quote #3

but is this then needed too?
Code:
 set_task(17.0,"ambience_loop")
Fawkes37 is offline
Reply



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 15:37.


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