Hey all,
I am trying to get a
welcome script that I found on the forum to work.
If you did not visit the link, this is the script:
package niceToGreetYou
{
function newChatHud_addLine(%text)
{
//Called when any line of text is added to the chat box
Parent::newChatHud_addLine(%text);
//This will turn the "Destiny connected." into "Destiny"
%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',"Hey, " @ %nameToGreet);
}
}
};
activatePackage(niceToGreetYou);
So far I have made a folder in the add-ons folder called "client_chatscript" and inside it I have three files: description.txt, namecheck.txt, and server.cs.
When I join a server, in the console I type:
exec("add-ons/client_chatscript/server.cs");
activatePackage(niceToGreetYou);
For an unknown reason, nothing happens and there are no error messages.
Thank you in advance for the help,
Kyle Avery