Text sent twice
#1

I know , and I have return false, The script works fine untill I add these

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 400)
    {
        if(!strlen(inputtext))
        {
        ShowPlayerDialog(playerid,400,DIALOG_STYLE_INPUT,"{0080FF}                           Age","{FFFFFF}What is your Birthdate? {0080FF}(Choose from 10 to 99)","Proceed","Cancel");
        //SendClientMessage(playerid, 0xFFFFFFFF, "Your Password Cannot be left Blank"); Kick(playerid);
        //ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
        return 1;
        }
        if(!response){ SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); Kick(playerid); return 0; }
        //Encrypt(inputtext);
       
        {
            new string[128];
            new tmp[256];
            new idx;
            if(!IsNumeric(inputtext)) return SendClientMessage(playerid, COLOR_WHITE, "ERROR: Numbers Only...");
            tmp = strtok(inputtext, idx);
            if(!strlen(inputtext))
            {
                ShowPlayerDialog(playerid,400,DIALOG_STYLE_INPUT,"{0080FF}                           Age","{FFFFFF}What is your Birthdate? {0080FF}(Choose from 10 to 99)","Proceed","Cancel");
                return false;
            }
            new moneys;
            moneys = strvalEx(inputtext);
            if(moneys < 10)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Choose from 10 to 99");
                ShowPlayerDialog(playerid,400,DIALOG_STYLE_INPUT,"{0080FF}                           Age","{FFFFFF}What is your Birthdate? {0080FF}(Choose from 10 to 99)","Proceed","Cancel");
                return false;
            }
            if(moneys > 99)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: Choose from 10 to 99");
                ShowPlayerDialog(playerid,400,DIALOG_STYLE_INPUT,"{0080FF}                           Age","{FFFFFF}What is your Birthdate? {0080FF}(Choose from 10 to 99)","Proceed","Cancel");
                return false;
            }
            Account[playerid][pAge] = moneys;
            format(string, sizeof(string), "Registered, please wait.",Account[playerid][pAge]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_WHITE, " ");
            //RegistrationStep[playerid] = 4;
            RegistrationStep[playerid] = 0;
            TutTime[playerid] = 1;
           
            return false;
        }
    }
           
    if(dialogid == 300)
    {
        if(!strlen(inputtext))
        {
            ShowPlayerDialog(playerid,300,DIALOG_STYLE_INPUT,"{0080FF}                        Sex","{FFFFFF}What is your gender? {0080FF}Male {FFFFFF}or {0080FF}Female  ","Proceed","Cancel");

            //SendClientMessage(playerid, 0xFFFFFFFF, "Your Password Cannot be left Blank"); Kick(playerid);
            //ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login to your account","Note - A account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel!","Login","Cancel");
            return 1;
        }
        if(!response){ SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); Kick(playerid); return 0; }
        //Encrypt(inputtext);
       
        {
            new tmp[256];
            new idx;
            tmp = strtok(inputtext, idx);
            if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male")))
            {
                Account[playerid][pSex] = 1;
                SetPlayerSkin(playerid, 101);
                Account[playerid][pModel] = 101;
                RegistrationStep[playerid] = 2;
                ShowPlayerDialog(playerid,400,DIALOG_STYLE_INPUT,"{0080FF}                           Age","{FFFFFF}What is your Birthdate? {0080FF}(Choose from 10 to 99)","Proceed","Cancel");
                return false;
            }
            else if((strcmp("female", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("female")))
            {
                Account[playerid][pSex] = 2;
                SetPlayerSkin(playerid, 12);
                Account[playerid][pModel] = 12;
                RegistrationStep[playerid] = 2;
                ShowPlayerDialog(playerid,400,DIALOG_STYLE_INPUT,"{0080FF}                           Age","{FFFFFF}What is your Birthdate? {0080FF}(Choose from 10 to 99)","Proceed","Cancel");
                return false;
            }
            else
            {
                ShowPlayerDialog(playerid,300,DIALOG_STYLE_INPUT,"{0080FF}                        Sex","{FFFFFF}What is your gender? {0080FF}Male {FFFFFF}or {0080FF}Female  ","Proceed","Cancel");
            }
            return false;
        }
    }
           
    if(dialogid == 100)
    {
        if(!strlen(inputtext))
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Your Password Cannot be Blank");
            ShowPlayerDialog(playerid,100,DIALOG_STYLE_INPUT,"{0080FF}                             Register your account","{0080FF}Note - {FFFFFF}An Account with this name was not found inside the database\n if you would like to register this account\nType in the password you would like to register with.","Register","Cancel");
            return 1;
        }
        if(!response){ SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); Kick(playerid); return 0; }
        Encrypt(inputtext);
        OnPlayerRegister(playerid,inputtext);
        //ShowPlayerDialog(playerid,300,DIALOG_STYLE_INPUT,"{0080FF}                        Sex","{FFFFFF}What is your gender? {0080FF}Male {FFFFFF}or {0080FF}Female  ","Proceed","Cancel");
    }
    if(dialogid == 200)
    {
        if(!strlen(inputtext))
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Your Password Cannot be left Blank"); Kick(playerid);
            ShowPlayerDialog(playerid,200,DIALOG_STYLE_INPUT,"{0080FF}                            Login to your account","{0080FF}Note - {FFFFFF}An account with this name was found inside the database,\n If this is your account,type in your password\n if not press cancel.","Login","Cancel");
            return 1;
        }
        if(!response){ SendClientMessage(playerid, 0xFFFFFFFF, "You canceled!"); Kick(playerid); return 0; }
       
        Encrypt(inputtext);
        OnPlayerLogin(playerid,inputtext);
       
    }
    return 1;
}
When I type something, it'll send it twice
Reply


Messages In This Thread
Text sent twice - by Jaber_Brown - 20.03.2013, 00:31
Respuesta: Text sent twice - by Strier - 20.03.2013, 01:17
Re: Text sent twice - by Jaber_Brown - 20.03.2013, 01:37
Re: Text sent twice - by Jaber_Brown - 20.03.2013, 01:40
Re: Text sent twice - by Jaber_Brown - 20.03.2013, 01:44

Forum Jump:


Users browsing this thread: 1 Guest(s)