Raised This Month: $ Target: $400
 0% 

Small problem with loop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mati009988
Member
Join Date: Jul 2009
Old 08-10-2010 , 04:45   Small problem with loop
Reply With Quote #1

Hi!
I`ve got a small problem with loop in roundsound.
When someone say rs no one hear music.
What is wrong?

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <ColorChat>

new bool:wylacz[33]

new const 
tytul1[]="author/title"
new const piosenka1[]="misc/sound.mp3"

new const tytul2[]="author/title"
new const piosenka2[]="misc/sound.mp3"

new const tytul3[]="author/title"
new const piosenka3[]="misc/sound.mp3"

new const tytul4[]="author/title"
new const piosenka4[]="misc/sound.mp3"

new const tytul5[]="author/title"
new const piosenka5[]="misc/sound.mp3"

new const tytul6[]="author/title"
new const piosenka6[]="misc/sound.mp3"

new const tytul7[]="author/title"
new const piosenka7[]="misc/sound.mp3"

new const tytul8[]="author/title"
new const piosenka8[]="misc/sound.mp3"

new const tytul9[]="author/title"
new const piosenka9[]="misc/sound.mp3"

new const tytul10[]="author/title"
new const piosenka10[]="misc/sound.mp3"

new const tytul11[]="author/title"
new const piosenka11[]="misc/sound.mp3"

public plugin_init() {
    
register_plugin("RoundSound""1.0""S!p")
    
register_logevent("KoniecRundy",2,"1=Round_End")
    
register_clcmd("say roundsound""roundsound")
    
register_clcmd("say /roundsound""roundsound")
    
register_clcmd("say_team roundsound""roundsound")
    
register_clcmd("say_team /roundsound""roundsound")
    
register_clcmd("say roundsound""roundsound")
    
register_clcmd("say rs""roundsound")
    
register_clcmd("say_team rs""roundsound")
}

public 
client_connect(iwylacz[i] = false

public KoniecRundy(i){
    for(new 
i=i<=32 i++){
        if(!
is_user_connected(i)) return PLUGIN_HANDLED_MAIN
        
switch (random_num(1,11)){
            case 
1: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka1)
                
ColorChat(0RED"[RS] %s",tytul1)
            }
            case 
2: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka2)
                
ColorChat(0RED"[RS] %s",tytul2)
            }
            case 
3: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka3)
                
ColorChat(0RED"[RS] %s",tytul3)
            }
            case 
4: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka4)
                
ColorChat(0RED"[RS] %s",tytul4)
            }
            case 
5: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka5)
                
ColorChat(0RED"[RS] %s",tytul5)
            }
            case 
6: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka6)
                
ColorChat(0RED"[RS] %s",tytul6)
            }
            case 
7: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka7)
                
ColorChat(0RED"[RS] %s",tytul7)
            }
            case 
8: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka8)
                
ColorChat(0RED"[RS] %s",tytul8)
            }
            case 
9: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka9)
                
ColorChat(0RED"[RS] %s",tytul9)
            }
            case 
10: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka10)
                
ColorChat(0RED"[RS] %s",tytul10)
            }
            case 
11: { 
                if(
wylacz[i]) return PLUGIN_HANDLED
                client_cmd
(0"mp3 stop")
                
client_cmd(0"stopsound")
                
client_cmd(0"mp3 play sound/%s"piosenka11)
                
ColorChat(0RED"[RS] %s",tytul11)
            }
        }
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED
}

public 
roundsound(i){
    if(
wylacz[i]){
        
wylacz[i] = false
        ColorChat
(iRED"[RS]^x01 RoundSound ^x04on")
    }
    else {
        
wylacz[i] = true
        ColorChat
(iRED"[RS]^x01 RoundSound ^x04off")
    }
}

public 
plugin_precache(){
    
precache_sound(piosenka1)
    
precache_sound(piosenka2)
    
precache_sound(piosenka3)
    
precache_sound(piosenka4)
    
precache_sound(piosenka5)
    
precache_sound(piosenka6)
    
precache_sound(piosenka7)
    
precache_sound(piosenka8)
    
precache_sound(piosenka9)
    
precache_sound(piosenka10)
    
precache_sound(piosenka11)

mati009988 is offline
 



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 21:55.


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