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
#2

Its been quite a while.. over a week since no one has helped me :L
Reply
#3

Anyone? -.-
Reply
#4

they need to type dd/mm/yyyy in normal(IC chat) or in dialog or in something else?
Reply
#5

IC chat
Reply
#6

Then the problem is in public OnPlayerText(playerid, text[]).
Show us what stands inside it.

Is this what you have already posted from that callback?
Reply
#7

Ok hold on
Reply
#8

public OnPlayerText(playerid, text[])
{
if(gPlayerLogged{playerid} != 1)
{
SendClientMessageEx(playerid, COLOR_RED, "You are not logged in.");
return 0;
}

new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new string[128];
playerLastTyped[playerid] = 0;


if(TextSpamUnmute[playerid] != 0)
{
if(PlayerInfo[playerid][pAdmin] < 2)
{
SendClientMessage(playerid, COLOR_WHITE, "You are muted from submitting text right now.");
return 0;
}
}

if(PlayerInfo[playerid][pAdmin] < 2)
{
TextSpamTimes[playerid]++;

if(TextSpamTimes[playerid] == 5)
{
TextSpamTimes[playerid] = 0;
TextSpamUnmute[playerid] = 10;
SendClientMessageEx(playerid, COLOR_YELLOW, "You have been muted automatically for spamming. Please wait 10 seconds and try again.");
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_FLOODPROTECTION);
return 0;
}
}


/*Compares last string with current, if the same, alert the staff only on the 3rd command. (Expires after 5 secs)
if(PlayerInfo[playerid][pAdmin] < 2) {
new laststring[128];
if(GetPVarString(playerid, "LastText", laststring, 12) {
if(!strcmp(laststring, text, true)) {
TextSpamTimes[playerid]++;

if(TextSpamTimes[playerid] == 2) {
TextSpamTimer[playerid] = 30;
TextSpamTimes[playerid] = 0;
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is spamming with: %s", GetPlayerNameEx(playerid), playerid, text);
ABroadCast(COLOR_YELLOW, string, 2);
}
}
}
SetPVarString(playerid, "LastText", text);
}*/

if(strfind(text, "|", true) != -1) {
SendClientMessageEx(playerid, COLOR_RED, "You cannot use the '|' character in text.");
return 0;
}

if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessageEx(playerid, COLOR_GREY, "You cannot speak, you have been silenced!");
return 0;
}

if(PlayerInfo[playerid][pAdmin] < 2) {
if(strfind(text, ":", true) != -1) {
new
i_numcount,
i_period,
i_pos;

while(text[i_pos]) {
if('0' <= text[i_pos] <= '9') i_numcount++;
else if(text[i_pos] == '.') i_period++;
i_pos++;
}
if(i_numcount >= 8 && i_period >= 3) {
format(string,sizeof(string),"Warning: %s may be server advertising: '%s'.", GetPlayerNameEx(playerid),text);
SendAdminMessage(COLOR_RED, string);
return 0;
}
}
}

if(GetPVarInt(playerid, "ChoosingDrugs") == 1)
{
if (strcmp("pot", text, true) == 0)
{
new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if (IsPlayerInRangeOfPoint(playerid, 3.0, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz]) && strcmp(Points[i][Name], "Drug Factory", true) == 0)
{
mypoint = i;
}
}
if (mypoint == -1)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Drug Factory!");
return 0;
}
if(PlayerInfo[playerid][pCrates])
{
SendClientMessageEx(playerid, COLOR_GREY, " You can't hold any more Drug Crates!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
if(GetPlayerCash(playerid) > 1000)
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You bought some Drug Crates for $1000.");
GivePlayerCash(playerid, -1000);
PlayerInfo[playerid][pCrates] = 1;
SetPVarInt(playerid, "CrateDeliver", 1);
SetPVarInt(playerid, "ChoosingDrugs", 0);
SetPVarInt(playerid, "tpDrugRunTimer", 45);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPDRUGRUNTIMER);
SetPlayerCheckpoint(playerid, 2166.3772,-1675.3829,15.0859, 3);
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] += 500;
}
}
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_GREY," You can't afford the $1000!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
}
else if (strcmp("crack", text, true) == 0)
{
new mypoint = -1;
for (new i=0; i<MAX_POINTS; i++)
{
if (IsPlayerInRangeOfPoint(playerid, 3.0, Points[i][Pointx], Points[i][Pointy], Points[i][Pointz]) && strcmp(Points[i][Name], "Drug Factory", true) == 0)
{
mypoint = i;
}
}
if (mypoint == -1)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not at the Drug Factory!");
return 0;
}
if(PlayerInfo[playerid][pCrates])
{
SendClientMessageEx(playerid, COLOR_GREY, " You can't hold any more drug crates!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
if(GetPlayerCash(playerid) > 1000)
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You bought some drug crates for $1000.");
GivePlayerCash(playerid, -1000);
PlayerInfo[playerid][pCrates] = 1;
SetPVarInt(playerid, "CrateDeliver", 2);
SetPVarInt(playerid, "ChoosingDrugs", 0);
SetPVarInt(playerid, "tpDrugRunTimer", 45);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPDRUGRUNTIMER);
SetPlayerCheckpoint(playerid, 2354.2808,-1169.2959,28.0066, 3);
for(new i = 0; i < sizeof(FamilyInfo); i++)
{
if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
{
FamilyInfo[i][FamilyBank] += 500;
}
}
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_GREY," You can't afford the $1000!");
SetPVarInt(playerid, "ChoosingDrugs", 0);
return 0;
}
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTRED,"What type of drugs would you like to smuggle? Type 'crack' or 'pot'.");
return 0;
}
}
if(SelectChar[playerid] == 255)
{
if (strcmp("next", text, true) == 0)
{
switch (SelectCharID[playerid])
{
case 1: //Police Force
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[0][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[1][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[2][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[3][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[4][0]; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[5][0]; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 8; ChosenSkin[playerid] = JoinPed[6][0]; }
else if(SelectCharPlace[playerid] == { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 9; ChosenSkin[playerid] = JoinPed[7][0]; }
else if(SelectCharPlace[playerid] == 9) { SetPlayerSkin(playerid, JoinPed[8][0]); SelectCharPlace[playerid] = 10; ChosenSkin[playerid] = JoinPed[8][0]; }
else if(SelectCharPlace[playerid] == 10) { SetPlayerSkin(playerid, JoinPed[9][0]); SelectCharPlace[playerid] = 11; ChosenSkin[playerid] = JoinPed[9][0]; }
else if(SelectCharPlace[playerid] == 11) { SetPlayerSkin(playerid, JoinPed[10][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[10][0]; }
}
case 2: //FBI/ATF
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[11][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[11][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[12][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[12][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[13][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[13][0]; }
}
case 3: //SFPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[14][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[14][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[15][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[15][0]; }
}
case 4: //Fire&Ambulance
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[16][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[16][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[17][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[17][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[18][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[18][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[19][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[19][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[20][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[20][0]; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[21][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[21][0]; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[22][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[22][0]; }
}
case 6: //The Senate
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[31][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[31][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[32][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[32][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[33][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[33][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[34][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[34][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[35][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[35][0]; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[36][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[36][0]; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[37][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[37][0]; }
}
case 8: //Hitman Agency
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[38][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[38][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[39][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[39][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[40][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[40][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[41][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[41][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[42][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[42][0]; }
}
case 9: //News Reporters
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[43][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[43][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[44][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[44][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[45][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[45][0]; }
}
case 10: //Taxi Cab Company
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[46][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[46][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[47][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[47][0]; }
}
case 11: //National Guard
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[48][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[48][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[49][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[49][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[50][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[50][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[51][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[51][0]; }
}
}
return 0;
}
else if (strcmp("done", text, true) == 0)
{
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pVW] = 0;
SetPVarInt(playerid, "MedicBill", 0);
SelectCharPlace[playerid] = 0;
SelectCharID[playerid] = 0;
SelectChar[playerid] = 0;
PlayerInfo[playerid][pInt] = 0;
TogglePlayerControllable(playerid,1);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1715.1201,-1903.1711,13.5665);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Use 'next', or 'done'.");
return 0;
}
}
if(SelectFChar[playerid] == 255)
{
if (strcmp("next", text, true) == 0) {
new f2text;
f2text = PlayerInfo[playerid][pFMember];

if(FamilyInfo[f2text][FamilyMaxSkins] == 1)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
}

if(FamilyInfo[f2text][FamilyMaxSkins] == 2)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 1; }
}


if(FamilyInfo[f2text][FamilyMaxSkins] == 3)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 1; }
}

if(FamilyInfo[f2text][FamilyMaxSkins] == 3)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 1; }
}

if(FamilyInfo[f2text][FamilyMaxSkins] == 4)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 1; }
}

if(FamilyInfo[f2text][FamilyMaxSkins] == 5)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 1; }
}

if(FamilyInfo[f2text][FamilyMaxSkins] == 6)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 6; }
else if(SelectFCharPlace[playerid] == 6) { SetFamilySkin(playerid, 5); SelectFCharPlace[playerid] = 1; }
}

if(FamilyInfo[f2text][FamilyMaxSkins] == 7)
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 6; }
else if(SelectFCharPlace[playerid] == 6) { SetFamilySkin(playerid, 5); SelectFCharPlace[playerid] = 7; }
else if(SelectFCharPlace[playerid] == 7) { SetFamilySkin(playerid, 6); SelectFCharPlace[playerid] = 1; }
}

if(FamilyInfo[f2text][FamilyMaxSkins] ==
{
if(SelectFCharPlace[playerid] == 1) { SetFamilySkin(playerid, 0); SelectFCharPlace[playerid] = 2; }
else if(SelectFCharPlace[playerid] == 2) { SetFamilySkin(playerid, 1); SelectFCharPlace[playerid] = 3; }
else if(SelectFCharPlace[playerid] == 3) { SetFamilySkin(playerid, 2); SelectFCharPlace[playerid] = 4; }
else if(SelectFCharPlace[playerid] == 4) { SetFamilySkin(playerid, 3); SelectFCharPlace[playerid] = 5; }
else if(SelectFCharPlace[playerid] == 5) { SetFamilySkin(playerid, 4); SelectFCharPlace[playerid] = 6; }
else if(SelectFCharPlace[playerid] == 6) { SetFamilySkin(playerid, 5); SelectFCharPlace[playerid] = 7; }
else if(SelectFCharPlace[playerid] == 7) { SetFamilySkin(playerid, 6); SelectFCharPlace[playerid] = 8; }
else if(SelectFCharPlace[playerid] == { SetFamilySkin(playerid, 7); SelectFCharPlace[playerid] = 1; }
}
return 0;
}
else if (strcmp("done", text, true) == 0)
{
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
SetPlayerVirtualWorld(playerid,0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pInt] = 0;
SetPVarInt(playerid, "MedicBill", 0);
SelectFCharPlace[playerid] = 0;
SelectFCharID[playerid] = 0;
SelectFChar[playerid] = 0;
TogglePlayerControllable(playerid,1);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1715.1201,-1903.1711,13.5665);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Use 'next', or 'done'.");
return 0;
}
}
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)
{
}
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, "Thanks for filling in all the information, You can now play!");

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;
}

mean that?
Reply
#9

You're not getting any help because you're posting unwrapped code from the ngg script. Quit trying to compile it and download another godfather edit.
Reply
#10

I can't see from here where the bug is. They can't see Ic chat because you are returning 0. if you return 1 they will see the chat. are you sure that split() function is working correctly and that getdate as well?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)