Hi!
Code:
#include "inc_colortext"
void main()
{
string sInput = GetPCChatMessage();
string sFirst = GetStringLeft(sInput, 3);
if(sFirst == "/me") // me
{
sInput = ColorText(sInput, 186, 85, 211);
SetPCChatMessage(sInput);
}
if(sFirst == "/rp") // role play action
{
sInput = ColorText(sInput, 50, 205, 50);
SetPCChatMessage(sInput);
}
if(sFirst == "/ds") // dungeon master comment
{
sInput = ColorText(sInput, 255, 215, 0);
SetPCChatMessage(sInput);
}
if(sFirst == "/oo") // out of character
{
sInput = ColorText(sInput, 170, 170, 170);
SetPCChatMessage(sInput);
}
}
Need some help with this script. It should work like this, if someone type: "/me blabla", on chat should be only "babla", without this first 3 chars (/me). I tried to do this with GetSubString but it didnt work. Any idea?