24.08.2011, 20:10
pawn Code:
stock str_replace(currentstr[], replacestr[], findstr[])
{
while(strfind(currentstr, findstr) != -1)
{
new pos = strfind(currentstr, findstr), len = strlen(replacestr);
strdel(currentstr, pos, pos+len);
strins(currentstr, replacestr, pos);
}
return 1;
}
public OnPlayerText(playerid, text[])
{
str_replace(text, "$1234", "$$$");
return 1;
}