Could someone help me to toggle this mod with a console command?
package AutoGreeter
{
function newChatHud_addLine(%text)
if(%canGreet == 1)
{
{
//Called when any line of text is added to the chat box
Parent::newChatHud_addLine(%text);
//This will turn the "jes00 connected." into "jes00"
%nameToGreet = strReplace(%text," connected.","");
//If the %nameToGreet variable is different to the original line greet them,
//otherwise it's something else
if(%nameToGreet !$= %text)
{
//Send a chat message saying hi to the player who joined (%nameToGreet)
commandtoserver('messagesent',"Hi, " @ %nameToGreet);
}
}
}
};
activatePackage(AutoGreeter);
function autogreetOn(%canGreet);
%canGreet = 1;
commandToClient(%a,'messageBoxOk',"Auto Greeter, by jes00","Auto Greeter is now: On.");
function autogreetOff(%canGreet);
%canGreet = 0;
commandToClient(%a,'messageBoxOk',"Auto Greeter, by jes00","Auto Greeter is now: Off.");