Caps Lock
#7

pawn Код:
public OnPlayerText( playerid, text[ ] )
{
    if( IsCaps( text ) )
    {
        SendClientMessage( playerid, -1, "Disable the caps and rewrite" );
        return 0;
    }
    return 1; // Returns 0 only if you want to send a custom Chat.
}

stock IsCaps( text[ ] )
{
    for( new i, j = strlen( text )-1; i < j; i ++ )
    {
        if( ( 'A' <= text[ i ] <= 'Z' ) && ( 'A' <= text[ i+1 ] <= 'Z' ) )
            return true;
    }
    return false;
}
Reply


Messages In This Thread
Caps Lock - by ]Rafaellos[ - 27.02.2012, 18:06
Re: Caps Lock - by ProdrifterX - 27.02.2012, 19:23
Re: Caps Lock - by ]Rafaellos[ - 28.02.2012, 11:25
Re: Caps Lock - by Vince - 28.02.2012, 12:12
Re: Caps Lock - by ]Rafaellos[ - 28.02.2012, 12:20
Re: Caps Lock - by ]Rafaellos[ - 28.02.2012, 12:36
Re: Caps Lock - by Konstantinos - 28.02.2012, 12:40
Re: Caps Lock - by ]Rafaellos[ - 28.02.2012, 12:43
Re: Caps Lock - by Konstantinos - 28.02.2012, 12:44

Forum Jump:


Users browsing this thread: 1 Guest(s)