Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock ColouredText(text[])
- {
- new tString[16], I = -1;
- strmid(String, text, 0, 128, sizeof(String));
- for(new C = 0; C != sizeof(ColorsTag); C ++)
- {
- format(tString, sizeof(tString), "&%s", ColorsTag[C][ColorName]);
- while((I = strfind(String, tString, true, (I + 1))) != -1)
- {
- new tLen = strlen(tString);
- format(tString, sizeof(tString), "{%s}", ColorsTag[C][ColorID]);
- if(tLen < 8) for(new C2 = 0; C2 != (8 - tLen); C2 ++) strins(String, " ", I);
- for(new tVar; ((String[I] != 0) && (tVar != 8)); I ++, tVar ++) String[I] = tString[tVar];
- if(tLen > 8) strdel(String, I, (I + (tLen - 8)));
- }
- }
- return String;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement