AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Erro with end round sound (https://forums.alliedmods.net/showthread.php?t=224984)

Veggetta 08-30-2013 12:37

Erro with end round sound
 
hey guys, i have this:

Code:

public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)
               
        register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
        register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
}

public t_win()
{
        client_cmd(0,"stopsound")
       
        new players[32], count;
        get_players(players, count, "ch")
       
        for( new i; i < count; i++ )
        {
                new pid = players[i]; 
               
                if(cs_get_user_team(pid) & CS_TEAM_T)
                {
                        new rand = random_num(1,2)
                        switch(rand)
                        {
                                case 1: client_cmd(pid,"spk sound/final_round1")
                                case 2: client_cmd(pid,"spk sound/final_round2")
                        }
                }
        }
}

public ct_win()
{
        client_cmd(0,"stopsound")
       
        new players[32], count;
        get_players(players, count, "ch")
       
        for( new i; i < count; i++ )
        {
                new pid = players[i];
               
                if(cs_get_user_team(pid) & CS_TEAM_CT)
                {
                        new rand = random_num(1,3)
                        switch(rand)
                        {
                                case 1: client_cmd(pid,"spk sound/final_round1")
                                case 2: client_cmd(pid,"spk sound/final_round2")
                                case 3: client_cmd(pid,"spk sound/final_round3")
                        }
                }
        }
}

But isn't working .. Can anyone find the problem .. i looked at it 10000 times over and over and can't find the problem :s

Baws 08-30-2013 16:10

Re: Erro with end round sound
 
Full code please.


All times are GMT -4. The time now is 18:59.

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