I really need help !!!
#5

pawn Код:
else if(RegistrationStep[playerid] == 2)
      {
        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 && strvalEx(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: USA, Europe or Asia)");
            return 0;
      }
pawn Код:
stock strvalEx(const string[])
{
    if(strlen(string) >= 50)
    {
      return 0;
    }
    return strval(string);
}
Do this and will work :P
Reply


Messages In This Thread
I really need help !!! - by IVuljak - 17.04.2009, 08:46
Re: I really need help !!! - by Pyrokid - 17.04.2009, 23:08
Re: I really need help !!! - by basker - 18.04.2009, 01:15
Re: I really need help !!! - by ICECOLDKILLAK8 - 18.04.2009, 01:19
Re: I really need help !!! - by Danut - 18.04.2009, 10:11
Re: I really need help !!! - by IVuljak - 20.04.2009, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)