Hello

I'm working on a little project which involves a lot of scripting and such based on two commands like "on" and "off" or "stop" and "talk". I recently needed help with a parrot script which I have now done completely thanks to 0PiX0, but now I need even more help from other coders. I am using a radio code to play music in a house, which is sorted, however I want to be able to turn the radio on and off by saying "on" or "off", which I do not know how to do. It will be much appreciated if someone can show the code to me and help me understand, here is what I tried doing based on the parrot "talk" and "stop" coding :
function onCreated() {
this.enabled = true;
}
function onPlayerChats() {
if (player.chat == "on") {
this.enabled = true;
} elseif (player.chat == "off") {
this.enabled = false;
} elseif (this.enabled) {
playlooped
http://www.gaycove.com/downloads/i%2...0hd%20bep.mp3;
}
dont ask about the gaycove thing...my boss found it