Dialog Assistance
#1

How do i convert this into a Dialog with Input Style?

pawn Code:
new year, month,day;
            getdate(year, month, day);
            new DateInfo[3][20];
            split(text, DateInfo, '/');
            if(year - strvalEx(DateInfo[2]) > 100 || strvalEx(DateInfo[2]) < 1 || strvalEx(DateInfo[2]) >= year)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (Use dd/mm/yyyy)");
                return 0;
            }
            new check = year - strvalEx(DateInfo[2]);
            if(check == year)
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (Use dd/mm/yyyy)");
                return 0;
            }
            if(strvalEx(DateInfo[1]) > month)
            {
                check -= 1;
            }
            else if(strvalEx(DateInfo[1]) == month && strval(DateInfo[0]) > day)
            {
                check -= 1;
            }
            PlayerInfo[playerid][pAge] = check;
            format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
            SendClientMessage(playerid, COLOR_YELLOW2, string);
            RegistrationStep[playerid] = 3;
            SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Origin? (Type in: America, Europe, Asia or Africa)");
            return 0;
        }
help pleaase
Reply
#2

Read this, Should help.

https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)