Disabling Cap Keys
#3

maybe something like that..
pawn Код:
new CapsL[26][] =
{
    "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O",
    "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
};
new NCaps[26][] =
{
    "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o",
    "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
};

stock DisableCaps(text[])
{
    for(new n=0; n<strlen(text); n++)
    {
        for(new nx=0; nx<sizeof(CapsL); nx++)
        {
            if(text[n] == CapsL[nx])
            {
                text[n] = NCaps[nx];
            }
        }
    }
    return text;
}

public OnPlayerText(playerid, text[])
{
    if(playercapsdisbale[playerid])
    {
        new ntext[256];
        format(ntext, sizeof(ntext), "%s", DisableCaps(text));
        SendClientMessageToAll(GetPlayerColor(playerid), ntext);
        return 0;
    }
    return 1;
}
I did not test that, but just wrote it up.. if it doesn't work, it should at least give you a slight idea of how you could do it
Reply


Messages In This Thread
Disabling Cap Keys - by xMichaelx - 07.12.2011, 13:32
Re: Disabling Cap Keys - by Rob_Maate - 07.12.2011, 13:43
Re: Disabling Cap Keys - by Sascha - 07.12.2011, 13:43
Re: Disabling Cap Keys - by JamesC - 07.12.2011, 14:10
Re: Disabling Cap Keys - by cessil - 07.12.2011, 14:14
Re: Disabling Cap Keys - by xMichaelx - 07.12.2011, 15:23

Forum Jump:


Users browsing this thread: 1 Guest(s)