Cubelands, please learn TorqueScript or at least logical sense before releasing any add-on you made.
////////////////////////////////
//Author: Furling [BL_ID:6796]//
////////////////////////////////
package MyLittlePony
{
function NMH_Type::Send(%this)
{
if(getSubstr(%this.getValue(),0,1) $= "/" || %this.getValue() $= "")
{
Parent::Send(%this);
return;
}
%msg=%this.getValue();
%new=handle_MyLittlePony(%msg);
commandToserver('messageSent', %new);
canvas.popDialog(newMessageHud);
}
};
//activatepackage(MyLittlePony);
function handle_MyLittlePony(%msg)
{
%msg = strReplace(%msg, ":ponyangry:", "<bitmap:Add-Ons/Client_Chat_Emoticons_My_Little_Pony/angry.png>");
%msg = strReplace(%msg, ":ponyclassy:", "<bitmap:Add-Ons/Client_Chat_Emoticons_My_Little_Pony/classy.png>");
%msg = strReplace(%msg, ":ponyderp:", "<bitmap:Add-Ons/Client_Chat_Emoticons_My_Little_Pony/derp.png>");
%msg = strReplace(%msg, ":ponygiggle:", "<bitmap:Add-Ons/Client_Chat_Emoticons_My_Little_Pony/giggle.png>");
%msg = strReplace(%msg, ":ponyhappy:", "<bitmap:Add-Ons/Client_Chat_Emoticons_My_Little_Pony/happy.png>");
%msg = strReplace(%msg, ":ponyshock:", "<bitmap:Add-Ons/Client_Chat_Emoticons_My_Little_Pony/shock.png>");
%msg = strReplace(%msg, ":ponysmug:", "<bitmap:Add-Ons/Client_Chat_Emoticons_My_Little_Pony/smug.png>");
return %msg;
}
function ServerCmdponyhelp(%Client)
{
MessageClient(%Client,'',"\c2Type :ponyangry: :ponyclassy: :ponyderp: :ponygiggle: :ponyhappy: :ponyshock: :ponysmug:");
}
You cannot mix client-sided and server-sided code in this way, and secondly, this will only work if the server is running a chat mod which allows for Torque Markup Language in the chat, which the default doesn't.