//define the varable it´ll be saved in.
var on = false;
function procCmd(command) {
var cmd = command.split(" ");
var command1= "on"; //The name.
var command2= "example"; //if you need more commands (You can let it and the if(cmd[0]==command2){} away if you don´t need that.
if(cmd[0] == command1){
if(on==false){ //if on is false
on=true;
}else{ //if on is true
on=false
}
}
if(cmd[0] == command2){
//Code for the second command
}
}
//The rest of the script
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse Premium//The rest of the script