Registration Bug [NEED IMMEDIATE HELP]
#1

Okay so when a new player registers in my server he is asked again to type in his date of birth in the following format dd/mm/yy whatever, the bug is that they cannot type IC chat like normally without /b /l etc, when they do they are asked again their date of birth and when they type it in AGAIN, they are teleported back to the place where they spawned.

I hope you can help it will be much appreciated.
I am guessing this is the code..if not please give me an idea on where it could be :P

}
if(RegistrationStep[playerid] > 0)
{
if(RegistrationStep[playerid] == 1)
{
if (strcmp("male", text, true) == 0)
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a male.");
SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
RegistrationStep[playerid] = 2;
return 0;
}
else if (strcmp("female", text, true) == 0)
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a female.");
SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
RegistrationStep[playerid] = 2;
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTRED, "Are you a male or female? Type in your choice.");
}
return 0;
}
else if(RegistrationStep[playerid] == 2)
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
splits(text, DateInfo, '/');
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
return 0;
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
SendClientMessageEx(playerid, COLOR_LIGHTRED, "What is your date of birth? (Use dd/mm/yyyy)");
return 0;
}
if(strval(DateInfo[1]) > month)
{
check -= 1;
}
else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
PlayerInfo[playerid][pAge] = check;
PlayerInfo[playerid][pOrigin] = 0;
format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
SendClientMessageEx(playerid, COLOR_YELLOW2, string);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "Thank you for filling in this information, you have been refunded VIP! (Relog as there is a chat bug)");

PlayerInfo[playerid][pTut] = 1;
gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
TogglePlayerControllable(playerid, 1);
SetCamBack(playerid);
DeletePVar(playerid, "MedicBill");
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1715.1201,-1903.1711,13.5665);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
return 0;
}
return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)