AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Random play sounds (https://forums.alliedmods.net/showthread.php?t=197090)

EDUTz 09-28-2012 17:14

Random play sounds
 
Hello.
How can i make to play random sounds in one event.
something like:

play random {
client_cmd(iVictim,"mp3 play sound/misc/x.mp3")
client_cmd(iVictim,"mp3 play sound/misc/y.mp3")
client_cmd(iVictim,"mp3 play sound/misc/z.mp3")
}

i don;'t know the exact snipet code to use, if anyone can help, i'll be forever grateful :)
Thanks in advance.

Bos93 09-28-2012 17:39

Re: Random play sounds
 
PHP Code:

switch (random_num(13))
            {
                case 
1client_cmd(iVictim,"mp3 play sound/misc/x.mp3")
                case 
2client_cmd(iVictim,"mp3 play sound/misc/y.mp3")
                case 
3client_cmd(iVictim,"mp3 play sound/misc/z.mp3")
            } 


EDUTz 09-28-2012 17:40

Re: Random play sounds
 
Thank you very much.


All times are GMT -4. The time now is 08:19.

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