17.07.2007, 21:02
Well, a simple modeification to the function makes it work for everything:
pawn Code:
AddSlashs(s[],c,escapechar)
{
new string[STR];
for(new i = 0, j = strlen(s); i < j; i++)
{
if(s[i] == c)
{
string[i] = escapechar;
i++;
string[i] = c;
j++;
} else string[i] = s[i];
}
return string;
}