I'm trying to do a little help thing for my server based off of another little script, but it won't work because something's wrong/missing and I can't figure out what it is.
package SpawnHelp
{
function serverCmdMessageSent(%cl,%msg)
{
if(%msg $= "!help")
messageClient(%cl,'',"\c4The current server commands are:");
messageClient(%cl,'',"\c2!kill \c1Displays kill count.");
messageclient(%cl,'',"\c2!help \c1Displays this menu.");
messageclient(%cl,'',"\c4For any additional help, ask a server Admin.");
else
Parent::serverCmdMessageSent(%cl,%msg);
}
};
activatePackage(SpawnHelp);
It works fine if there's only one message sent to the client, so I assume I'm doing that wrong? I looked around and couldn't figure out how other add-ons did it with my low scripting knowledge.
Console says
else
##
##Parent::serverCmdMessageSent(%cl,%msg);
Is the problem. Can someone point me in at least the right direction? Thanks. Sorry if it's painfully obvious or something, but I'm slowly learning.