23.06.2018, 15:40
You still call strlen many times and it does work, just tested it to confirm.
pawn Код:
main()
{
OnPlayerText(0, " it works.");
}
public OnPlayerText(playerid, text[])
{
for (new i = 0, j = strlen(text); i < j; i++)
{
if ('a' <= text[i] <= 'z')
{
//text[i] = toupper(text[i]);
text[i] -= 32;
break;
}
}
printf("OPT: \"%s\"", text);
return 1;
}