Hello everyone.
I'm new to the language (Jscript or whatever) that this uses, although I am skilled in C/C++.
Anyways, I want to try and make a plugin and will turn C/C++ keywords blue, comments green, etc.
I just need a starter, such as a code that will just turn one word blue, and I can do the rest.
I came up with this:
code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{
if (sMessage.substr(0,1) == "if")
sMessage.substr(0,1) = "[c=2]if[/c]";
return sMessage;
}
but that didn't work.
I also tried..
code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage)
{
if (sMessage == "if")
sMessage = "[c=2]if[/c]";
return sMessage;
}
The first one works, but it only works when I say "if" and nothing else.
Any ideas?
-Paril Aughven Kalashnikov