06.01.2013, 09:47
Today I was looking at the PAWN example scripts (downloaded from CompuPhase's website some time ago) and I noticed a function that can be useful also in SA-MP. So I decided to edit it to make it avaiable in PAWN 3.0 and to paste it here 
That function will mangle the string you enter.
The original was this
but it will work only in pawn 4, and SA-MP uses pawn 3.

pawn Код:
rot13(string[])
{
for(new index = 0; string[index]; index ++)
{
if ('a' <= string[index] <= 'z')
string[index] = (string[index] - 'a' + 13) % 26 + 'a';
else if ('A' <= string[index] <= 'Z')
string[index] = (string[index] - 'A' + 13) % 26 + 'A';
}
return 0;
}
// By CompuPhase
The original was this
pawn Код:
rot13(string[])
{
for (new index = 0; string[index]; index++)
if ('a' <= string[index] <= 'z')
string[index] = (string[index] - 'a' + 13) % 26 + 'a'
else if ('A' <= string[index] <= 'Z')
string[index] = (string[index] - 'A' + 13) % 26 + 'A'
}

