17.08.2012, 01:44
(
Последний раз редактировалось TheChaoz; 17.08.2012 в 02:19.
)
Depende lo que quieres hacer. Si es algo bien basico, puedes hacer algo asi:
Si buscas algo mas avanzado entonces podrias hacer algo asi:
pawn Код:
public OnPlayerText(playerid, text[])
{
for(new i, j=strlen(text); i<j; i++)
if('0' <= text[i] <= '9')
text[i] = '*';
return 1;
}
pawn Код:
public OnPlayerText(playerid, text[])
{
new nums, dots, ddots, len;
len = strlen(text);
for(new i; i<len; i++)
{
if('0' <= text[i] <= '9')
nums++;
else if(text[i] == '.')
dots++;
else if(text[i] == ':')
ddots++;
}
if(nums > 7 && dots > 2 && ddots > 0)
for(new i; i<len; i++)
if('0' <= text[i] <= '9')
text[i] = '*';
return 1;
}