[Ajuda] Dialog
#7

pawn Код:
StrToHex (string []) //By. DOS
{
    new
        i,
        value;
       
    if (string [0] == '0' && (string [1] == 'x' || string [1] == 'X'))
        i = 2;

    while (string [i])
    {
        value <<= 4;
        switch (string [i])
        {
            case '0' .. '9':
                value |= string [i] - '0';

            case 'A' .. 'F':
                value |= string [i] - 'A' + 10;

            case 'a' .. 'f':
                value |= string [i] - 'a' + 10;

            default:
                return 0;
        }
        ++i;
    }
    return value;
}

if(dialogid == DIALOG_COR)
{
    if(response >= 0)
    {
       SetPlayerColor(playerid, StrToHex(inputtext));
    }
    return 1;
}
Reply


Messages In This Thread
Dialog - by HighBall - 18.08.2012, 17:19
Respuesta: Dialog - by AnonymouSs - 18.08.2012, 17:28
Re: Respuesta: Dialog - by HighBall - 18.08.2012, 17:37
Respuesta: Dialog - by AnonymouSs - 18.08.2012, 18:19
Re: Dialog - by Tony_Rodrigues - 18.08.2012, 18:24
Re: Dialog - by HighBall - 19.08.2012, 16:29
Re: Dialog - by paulor - 19.08.2012, 16:56
Re: Dialog - by HighBall - 19.08.2012, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)