Raised This Month: $ Target: $400
 0% 

Play 2 Sounds At The Same Time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
3xit.
Junior Member
Join Date: Nov 2012
Old 10-31-2013 , 00:49   Play 2 Sounds At The Same Time
Reply With Quote #1

Hello, I'm having trouble with trying to get to play 2 different sounds at the same time to different teams/players. Example: I want to play a sound on one player and play a different sounds to the players team at the same time.

Any help is appreciated thanks.
3xit. is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-31-2013 , 01:38   Re: Play 2 Sounds At The Same Time
Reply With Quote #2

I don't see where is your problem...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
3xit.
Junior Member
Join Date: Nov 2012
Old 10-31-2013 , 01:49   Re: Play 2 Sounds At The Same Time
Reply With Quote #3

I want to know how I can play 2 sounds at the same time but to different players/teams. Example is the player who captures the flag hears a sound saying "you have captured the flag". And his team will here "we have captured the flag".
3xit. is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-31-2013 , 02:10   Re: Play 2 Sounds At The Same Time
Reply With Quote #4

PHP Code:
PlayWinSound(iWinnerIndex, const szWinnerSound[]="", const szWinningTeamSound[]="")
{
    if( !
is_user_connected(iWinnerIndex) )
    {
        return 
0;
    }

    static const 
cmd[] = "spk %s";

    if( 
szWinnerSound[0] )
    {
        
client_cmd(iWinnerIndexcmdszWinnerSound);
    }

    if( 
szWinningTeamSound[0] )
    {
        new 
players[32], numidszTeam[11];
        
get_user_team(idszTeamcharsmax(szTeam));
        
get_players(playersnum"ce"szTeam);
        for(--
numnum>=0num--)
        {
            
id players[num];
            if( 
id != iWinnerIndex )
            {
                
client_cmd(idcmdszWinningTeamSound);
            }
        }
    }

    return 
1;

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 10-31-2013, 02:59
3xit.
This message has been deleted by 3xit.. Reason: ......
3xit.
Junior Member
Join Date: Nov 2012
Old 10-31-2013 , 03:02   Re: Play 2 Sounds At The Same Time
Reply With Quote #6

I'm sorry I cant get this to work.

PHP Code:
BlueSounds(iWinnerIndex, const szWinnerSound[]="TF/youhavetheenemyflag.wav", const szWinningTeamSound[]="TF/wehavetheenemyflag.wav"

    if( !
is_user_connected(iWinnerIndex) ) 
    { 
        return 
0
    } 
    static const 
cmd[] = "spk %s"
    if( 
szWinnerSound[0] ) 
    { 
        
client_cmd(iWinnerIndexcmdszWinnerSound); 
    } 
    if( 
szWinningTeamSound[0] ) 
    { 
        new 
players[32], numidszTeam[11]; 
        
get_user_team(idszTeamcharsmax(szTeam)); 
        
get_players(playersnum"ce"szTeam); 
        for(--
numnum>=0num--) 
        { 
            
id players[num]; 
            if( 
id != iWinnerIndex 
            { 
                
client_cmd(idcmdszWinningTeamSound); 
            } 
        } 
    } 
    return 
1

3xit. is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-31-2013 , 12:52   Re: Play 2 Sounds At The Same Time
Reply With Quote #7

PHP Code:
BlueSounds(id)
{
    
PlayWinSound(id"TF/youhavetheenemyflag.wav""TF/wehavetheenemyflag.wav");
}

PlayWinSound(iWinnerIndex, const szWinnerSound[]="", const szWinningTeamSound[]=""

    if( !
is_user_connected(iWinnerIndex) ) 
    { 
        return 
0
    } 

    static const 
cmd[] = "spk %s"

    if( 
szWinnerSound[0] ) 
    { 
        
client_cmd(iWinnerIndexcmdszWinnerSound); 
    } 

    if( 
szWinningTeamSound[0] ) 
    { 
        new 
players[32], numidszTeam[11]; 
        
get_user_team(idszTeamcharsmax(szTeam)); 
        
get_players(playersnum"ce"szTeam); 
        for(--
numnum>=0num--) 
        { 
            
id players[num]; 
            if( 
id != iWinnerIndex 
            { 
                
client_cmd(idcmdszWinningTeamSound); 
            } 
        } 
    } 

    return 
1

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 10-31-2013 at 12:52.
ConnorMcLeod 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 23:15.


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