08.08.2010, 19:38
Hi. I've a problem with this code. The code don't convert the string to standard link. Please help!
pawn Код:
#include <a_samp>
public OnGameModeInit()
{
print(ConvertToLinkString("йpй"));
return 1;
}
new table[] =
{
'Ц', 'ц', 'ő', 'Ő', 'ъ', 'Ъ', 'Ь', 'ь', 'У', 'у', 'й', 'Й', 'Б', 'б', 'ű', 'Ű',
'н', 'Н'
};
new table2[][] =
{
"%C3%96", "%C3%B6", "%C5%91", "%C5%90", "%C3%BA", "%C3%9A", "%C3%9C", "%C3%BC",
"%C3%93", "%C3%B3", "%C3%A9", "%C3%89", "%C3%81", "%C3%A1", "%C5%B1", "%C5%B0",
"%C3%AD", "%C3%8D"
};
stock ConvertToLinkString(string[])
{
new string2[256];
for(new i = 0; i <= strlen(string); i++)
{
string2[i] = string[i];
for(new j = 0; j <= sizeof(table); j++)
{
if(string2[i] == table[j])
{
for(new k = 0; k <= 6; k++)
{
string2[i] = table2[j][k];
i++;
}
break;
}
}
}
return string2;
}