Author Topic: Cmd Activated Sound  (Read 793 times)

I was wondering how you would activate a sound by typing a command like: /sound would make a sound. I have made the script for the command and the other effect, but i can't figure out how to make the sound work. If you could help me that would be great.
« Last Edit: June 27, 2008, 02:40:17 PM by Cog_Spartan »

Code: [Select]
//serverCmd basically means it's a slash command. /noise triggers this function.
// %client is the client who entered in /noise.
function serverCmdNoise(%client)
{
// Uses a built-in function to trigger a sound.
%client.play2d(rewardSound);
}

All there is to it. That function will make the user have a reward sound played. You'll need to poke around more to figure out how to do other sounds.