[Ajuda] Dialog Input sу Numeros
#4

pawn Код:
ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_INPUT, "Numero","Digite um nъmero","Confirmar","");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    if ( dialogid == 1000 ) {
   
        if ( IsNumeric(inputtext) )
            SendCLientMessage(playerid, -1, "Vocк digitou um numero, parabens!");
        else
            ShowPlayerDialog(playerid, 1000, DIALOG_STYLE_INPUT, "Numero","Digite um nъmero\nApenas numeros","Confirmar","");
   
        return true;
    }
    return 0;
}
IsNumeric(const string[])
 
{
 
    for (new i = 0, j = strlen(string); i < j; i++)
 
    {
 
        if (string[i] > '9' || string[i] < '0') return 0;
 
    }
 
    return 1;
 
}
Reply


Messages In This Thread
Dialog Input sу Numeros - by SampSampa - 24.03.2013, 02:57
Re: Dialog Input sу Numeros - by Crueliz0n - 24.03.2013, 02:59
Re: Dialog Input sу Numeros - by SampSampa - 24.03.2013, 03:00
Re: Dialog Input sу Numeros - by Gii - 24.03.2013, 03:09
Re: Dialog Input sу Numeros - by vitorvlv - 24.03.2013, 03:12

Forum Jump:


Users browsing this thread: 1 Guest(s)