Raised This Month: $ Target: $400
 0% 

Help with plugin sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blackwave
Junior Member
Join Date: Jan 2011
Old 01-09-2011 , 12:24   Help with plugin sound
Reply With Quote #1

Hello. I'm new in this forum. I need help with my sound plugin, which plays a random sound on TR/CT winning ( depending which one ). I extracted selected parts from some of my favorite musics, and saved as .wav. The plugin will play songs.. but the problem is that all of these songs doesn't stops... Just the file:

rollingstar.wav

I dont know why. Hope you can help me. My code:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <csx>

#define PLUGIN "Death"
#define VERSION "2.0"
#define AUTHOR "felipe"
#pragma tabsize 0
new sounds[][] = 
{
    "misc/rollingstar.wav",
         "misc/clubcanthandle.wav",
         "misc/control.wav",
         "misc/loveisgone.wav",
         "misc/gottaremix.wav",
         "misc/tiesto.wav",
         "misc/girl.wav",
         "misc/partyanimal.wav",
         "misc/gettinover.wav",
         "misc/rollerhead.wav",
         "misc/owlcity.wav"
};
public plugin_precache() 
{
   for ( new i; i == sizeof sounds; i++ )
   {
       precache_sound( sounds[ i ] );
   }
   return PLUGIN_CONTINUE
}
public plugin_init() 
{ 
   register_plugin("Die Music","1.0","Punani")
   register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
   register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")  
   return PLUGIN_CONTINUE
    
}
public t_win()
{
   client_cmd(0,"stopsound")
   play_sound("misc/rollingstar")
   return PLUGIN_HANDLED
   
}

public ct_win()
{
   client_cmd(0,"stopsound")
   play_sound("misc/owlcity")
   return PLUGIN_HANDLED
}

  

public client_death(killer, victim, wpnindex, hitplace, TK)
{
         
    static killerName[32], victimName[32], message[128];
     new selfkill = (killer == victim) ? 1 : 0
    if(selfkill || killer == victim || killer == 0 || wpnindex == CSW_HEGRENADE &&  selfkill == 0)
    {
              //client_cmd(0,"mp3 play sound/misc/end1.mp3")
              play_sound("misc/burico")
              get_user_name(victim, victimName, 31)
              formatex(message, sizeof(message),"%s se matou ! ! !",victimName);
              client_print(0, print_center, message);
        
         }
    if(wpnindex == CSW_KNIFE)
    {
        play_sound("misc/cadechinelo")
         }
     
    return PLUGIN_CONTINUE 
}
public eEndRound()
{
   
   client_cmd(0,"stopsound")
   return PLUGIN_CONTINUE
}




public play_sound(sound[])
{
        new players[32], pnum
        get_players(players, pnum, "c")
        new i
        
        for (i = 0; i < pnum; i++)
        {
                if (is_user_connecting(players[i]))
                        continue
                
                client_cmd(players[i], "spk %s", sound)
        }
}
This one is moddified, since I was tryin to check if any other songs wouldn't stop
blackwave is offline
blackwave
Junior Member
Join Date: Jan 2011
Old 01-09-2011 , 19:05   Re: Help with plugin sound
Reply With Quote #2

bump .
blackwave is offline
blackwave
Junior Member
Join Date: Jan 2011
Old 01-10-2011 , 14:30   Re: Help with plugin sound
Reply With Quote #3

bump... over 2 days
blackwave is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-10-2011 , 14:32   Re: Help with plugin sound
Reply With Quote #4

should wait 2 weeks to bumb
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Len
Senior Member
Join Date: Dec 2007
Old 01-11-2011 , 11:54   Re: Help with plugin sound
Reply With Quote #5

uve got to wait 15 days after a day or two you thread will be on the next page an most people don't bother checking them, so then you've got to pointlessly wait a further 13 days for a answer im afraid it's the rules
Len 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 02:07.


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