22.02.2014, 12:46
I think this should work.
pawn Код:
public OnPlayerText(playerid, text[])
{
if(IsTextCaps(text))
{
SendClientMessage(playerid, 0xFF0000FF, "Turn off your caps!");
return 0; // Will not send the text
}
return 1;
}
stock IsTextCaps(text[])
{
for(new i, j = strlen(text)-1; i < j; i ++)
{
if(('A' <= text[i] <= 'Z') && ('A' <= text[i+1] <= 'Z')) // If the letters were in CAPS
return 1;
}
return 0;
}