Raised This Month: $ Target: $400
 0% 

win sound problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 01-03-2011 , 11:37   win sound problem
Reply With Quote #1

I need that if Terrorist team won then to terrorists play success.wav , and to ct's you_failed.wav, if ct's win to terrorists you_failed.wav , to ct's success.wav.

PHP Code:
public message_SendAudio(msg_idmsg_destid)
{
    new 
AudioCode[22]; 
    
get_msg_arg_string(2AudioCodecharsmax(AudioCode) )
    
    if(
equal(AudioCode"%!MRAD_terwin"))
    {
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_msg_arg_string(2"gungame/success.wav")
        }
        else if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
set_msg_arg_string(2"gungame/you_failed.wav")
        }
    }    
    else if(
equal(AudioCode"%!MRAD_ctwin"))
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
set_msg_arg_string(2"gungame/success.wav")
        }
        else if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_msg_arg_string(2"gungame/you_failed.wav")        
        }
    }
    return 
PLUGIN_CONTINUE

DoviuX is offline
Send a message via Skype™ to DoviuX
reinert
Veteran Member
Join Date: Feb 2007
Old 01-03-2011 , 13:04   Re: win sound problem
Reply With Quote #2

you have to get ct and t players with get_players...
reinert is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 01-03-2011 , 13:06   Re: win sound problem
Reply With Quote #3

Quote:
Originally Posted by DoviuX View Post
I need that if Terrorist team won then to terrorists play success.wav , and to ct's you_failed.wav, if ct's win to terrorists you_failed.wav , to ct's success.wav.

PHP Code:
public message_SendAudio(msg_idmsg_destid)
{
    new 
AudioCode[22]; 
    
get_msg_arg_string(2AudioCodecharsmax(AudioCode) )
    
    if(
equal(AudioCode"%!MRAD_terwin"))
    {
        if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_msg_arg_string(2"gungame/success.wav")
        }
        else if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
set_msg_arg_string(2"gungame/you_failed.wav")
        }
    }    
    else if(
equal(AudioCode"%!MRAD_ctwin"))
    {
        if(
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
set_msg_arg_string(2"gungame/success.wav")
        }
        else if(
cs_get_user_team(id) == CS_TEAM_T)
        {
            
set_msg_arg_string(2"gungame/you_failed.wav")        
        }
    }
    return 
PLUGIN_CONTINUE

Loop through the players.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX 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:06.


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