Stock that allows you to use new letters.
These letters with my stock can be coded with UTF8 HEX system metod.
A lot of compilers (like AMXX-Studio) won't allow you to compile some "weird" chars (everything is automatically coded into ASCII) but with this stock it is posibble.
How to?
Add here the char that you wanna use with the stock (if u don't get it, hope you will at the end) For example, we'll make REGISTERED SIGN. I'll name it as 'R'
Code: Select all
new const chNewChars[] = {
'ą',
'ó',
'ę',
'ż',
'ź',
'ł',
'ń',
'ć',
'ś',
'Ą',
'Ó',
'Ę',
'Ż',
'Ź',
'Ł',
'Ń',
'Ć',
'Ś',
'R'
};it should be in format
{0xFFFFFF**, 0xFFFFFF**, 0}
For example
The bolded text is what we are looking for
U+00AE ® c2 ae REGISTERED SIGN
so to add that char you will have to extend the table and add your utf8 combination. Our "registered sign" had c2 ae so the code will look like this :
{0xFFFFFFC2, 0xFFFFFFAE, 0}
Code: Select all
new const iUTF8_HEX[sizeof chNewChars][] = {
{0xFFFFFFC4, 0xFFFFFF85, 0}, // ą
{0xFFFFFFC3, 0xFFFFFFB3, 0}, // ó
{0xFFFFFFC4, 0xFFFFFF99, 0}, // ę
{0xFFFFFFC5, 0xFFFFFFBC, 0}, // ż
{0xFFFFFFC5, 0xFFFFFFBA, 0}, // ź
{0xFFFFFFC5, 0xFFFFFF82, 0}, // ł
{0xFFFFFFC5, 0xFFFFFF84, 0}, // ń
{0xFFFFFFC4, 0xFFFFFF87, 0}, // ć
{0xFFFFFFC5, 0xFFFFFF9B, 0}, // ś
{0xFFFFFFC4, 0xFFFFFF84, 0}, // Ą
{0xFFFFFFC3, 0xFFFFFF93, 0}, // Ó
{0xFFFFFFC4, 0xFFFFFF98, 0}, // Ę
{0xFFFFFFC5, 0xFFFFFFBB, 0}, // Ż
{0xFFFFFFC5, 0xFFFFFFB9, 0}, // Ź
{0xFFFFFFC5, 0xFFFFFF81, 0}, // Ł
{0xFFFFFFC5, 0xFFFFFF83, 0}, // Ń
{0xFFFFFFC4, 0xFFFFFF86, 0}, // Ć
{0xFFFFFFC5, 0xFFFFFF9A, 0}, // Ś
{0xFFFFFFC2, 0xFFFFFFAE, 0} // (R) SIGN
};And here is the part with "sign name".
Code: Select all
#include <newchars>
public plugin_init() {
new sSign[3];
newChar('R', sSign, sizeof sSign - 1); //We named it as 'R' in chNewChars
client_print(0, 3, "REGISTERED SIGN : %s", sTab);
} 