U vezi registracije

Započeo bla, Novembar 09, 2009, 21:19:31 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

bla

*

if(RegistrationStep[playerid] > 0)
{
   if(RegistrationStep[playerid] == 1)
   {
       new idx;
    tmp = strtok(text, idx);
   if((strcmp("male", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("male")))
{
   PlayerInfo[playerid][pSex] = 1;
   SendClientMessage(playerid, COLOR_YELLOW2, "Ok, so you are a Male.");
   SendClientMessage(playerid, COLOR_LIGHTRED, "What is your birthdate? (Use dd/mm/yyyy)");
   RegistrationStep[playerid] = 2;
   return 0;
}
else if((strcmp("female", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("female")))
{
   PlayerInfo[playerid][pSex] = 2;
   SendClientMessage(playerid, COLOR_YELLOW2, "Ok, so you are a Female.");
   SendClientMessage(playerid, COLOR_LIGHTRED, "What is your birthdate? (Use dd/mm/yyyy)");
   RegistrationStep[playerid] = 2;
   return 0;
}
else
{
   SendClientMessage(playerid, COLOR_LIGHTRED, "Are you a Male or Female? (Type in what you are).");
}
return 0;
}
else if(RegistrationStep[playerid] == 2)
   {
       new year, month,day;
getdate(year, month, day);
       new DateInfo[3][20];
split(text, DateInfo, '/');
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
   SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (Use dd/mm/yyyy)");
   return 0;
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
   SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Birthdate? (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;
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;
   }
   else if(RegistrationStep[playerid] == 3)
   {
       new idx;
    tmp = strtok(text, idx);
   if((strcmp("usa", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("usa")))
{
   PlayerInfo[playerid][pOrigin] = 1;
   SendClientMessage(playerid, COLOR_YELLOW2, "Ok, so you are from the USA.");
   SendClientMessage(playerid, COLOR_YELLOW2, "Sada slijedi par RP pitanja.");
   SendClientMessage(playerid, COLOR_YELLOW2, "__________________________.");
   SendClientMessage(playerid, COLOR_YELLOW2, "Sto je RolePlay??.");
   SendClientMessage(playerid, COLOR_LIGHTRED, "1.Nesto sto se dogadja u stvarnom svijetu");
   SendClientMessage(playerid, COLOR_LIGHTRED, "2. Mjesanje IC i OOC chata");
RegistrationStep[playerid] = 0;
   TutTime[playerid] = 1;
   return 0;
}
else if((strcmp("europe", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("europe")))
{
   PlayerInfo[playerid][pOrigin] = 2;
   SendClientMessage(playerid, COLOR_YELLOW2, "Ok, so you are from Europe.");
   SendClientMessage(playerid, COLOR_YELLOW2, "Sada slijedi par RP pitanja.");
   SendClientMessage(playerid, COLOR_YELLOW2, "__________________________.");
   SendClientMessage(playerid, COLOR_YELLOW2, "Sto je RolePlay??.");
   SendClientMessage(playerid, COLOR_LIGHTRED, "1.Nesto sto se dogadja u stvarnom svijetu");
   SendClientMessage(playerid, COLOR_LIGHTRED, "2. Mjesanje IC i OOC chata");
RegistrationStep[playerid] = 0;
   TutTime[playerid] = 1;
   return 0;
}
else if((strcmp("asia", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("asia")))
{
   PlayerInfo[playerid][pOrigin] = 3;
   SendClientMessage(playerid, COLOR_YELLOW2, "Ok, so you are from Asia.");
   SendClientMessage(playerid, COLOR_YELLOW2, "Sada slijedi par RP pitanja.");
   SendClientMessage(playerid, COLOR_YELLOW2, "__________________________.");
   SendClientMessage(playerid, COLOR_YELLOW2, "Sto je RolePlay??.");
   SendClientMessage(playerid, COLOR_LIGHTRED, "1.Nesto sto se dogadja u stvarnom svijetu");
   SendClientMessage(playerid, COLOR_LIGHTRED, "2. Mjesanje IC i OOC chata");
RegistrationStep[playerid] = 0;
   TutTime[playerid] = 1;
   return 0;
}
else
{
   SendClientMessage(playerid, COLOR_LIGHTRED, "What is your Origin? (Type in: USA, Europe or Asia)");
}
return 0;
   }
return 0;
}
   if(RegistrationStep[playerid] == 4)
   {
   if((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
{
   SendClientMessage(playerid, COLOR_YELLOW2, "Tocno.");
   SendClientMessage(playerid, COLOR_LIGHTRED, "Sto je MG?.");
RegistrationStep[playerid] = 5;
   TutTime[playerid] = 1;
   return 0;
    }
return 0;
}


Ovako napravio sam pri registraciji RolePlay pitanje i sad kad zavrism ono male,datum rodjenja,odakle sam, i izbaci mi sad ono Sta je RolePlay i odjednom krene tutorial i ne odgovorim na pitanje odma krene tutorial mozeteli vidjeti u cemu je problem


Edit: ocel iko vise pomoci??
Poslednja Izmena: Novembar 10, 2009, 11:37:16 PRE PODNE od Me TO!

SendClientMessage(playerid, COLOR_LIGHTRED, "Thank you for filling in all the information, now you will proceed to the Tutorial.");
RegistrationStep[playerid] = 0;


dakle, kad je RegistrationStep[playerid] = 0 onda se pokrece tutorial. nakon tvog pitanja, Sto je rolplej, registration step postaje 0, sto znaci da se prebacuje na tutorial. umjesto nule moras stavit 4

    SendClientMessage(playerid, COLOR_YELLOW2, "Sada slijedi par RP pitanja.");
    SendClientMessage(playerid, COLOR_YELLOW2, "__________________________.");
    SendClientMessage(playerid, COLOR_YELLOW2, "Sto je RolePlay??.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "1.Nesto sto se dogadja u stvarnom svijetu");
    SendClientMessage(playerid, COLOR_LIGHTRED, "2. Mjesanje IC i OOC chata");
RegistrationStep[playerid] = 0;
    TutTime[playerid] = 1;
    return 0;
}


vidis? ajde ispravi ovo pa vidi kako ti radi, meni se neda, a inace trebalo bi radit

AKO vam je dosadno, i trenutno, na ovom forumu niste da ucite skriptat ili tako nesto, usudio bi se rec, intelektualno, onda se regajte na ovu stranicu tako da kliknes na sliku. probaj pa i ti nadodaj refferale koji ce klikcat za tebe kao sto ces ti sad za mene xD

bla

*

if(RegistrationStep[playerid] == 4)
    {
    if((strcmp("1", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("1")))
{
    SendClientMessage(playerid, COLOR_YELLOW2, "Tocno.");
    SendClientMessage(playerid, COLOR_LIGHTRED, "Sto je MG?.");
RegistrationStep[playerid] = 4;
    TutTime[playerid] = 1;
    return 0;
    }
return 0;
}


Vidis li tu koji tu ide RegistrationSteP??

aj ti meni citavu skriptu registracije posalji ja cu rec sta ti nevalja

AKO vam je dosadno, i trenutno, na ovom forumu niste da ucite skriptat ili tako nesto, usudio bi se rec, intelektualno, onda se regajte na ovu stranicu tako da kliknes na sliku. probaj pa i ti nadodaj refferale koji ce klikcat za tebe kao sto ces ti sad za mene xD