On *:join:#fragharry: {
/write -c names.txt $nick
if ( $nick == Peter ) { splay peter.wav }
elseif ( $nick == David ) { splay david.wav }
elseif ( $nick == Tony ) { splay tony.wav }
}
If you raname the soundfiles exactly like the usernames, you can remove line 3-5 and put this:
/splay $nick $+ .wav
You don't need to set the path to sound files that are in the sounds folder in mIRC.
The names.txt will be created in %appdata% or next to mirc.exe (deppends on your installation).
On *:join:#:fragharry {
write -c names.txt $nick
if ($istok(Peter David Tony,$nick,32)) sound $nick $+ .wav
}