Jump to content
  • 0

Dialog Sexul/Data de nastere/


alexnitu

Question

Salut, cum pot face un dialog la sv de roleplay cu Data de nastere / Sexul  ?

[pawn]if(RegistrationStep[playerid] == 1)

    {

        new idx;

    tmp = strtok(text, idx);

    if((strcmp("baiat", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("baiat")))

{

                GetPlayerName(playerid, sendername, sizeof(sendername));

    PlayerInfo[playerid][pSex] = 1;

    format(string, sizeof(string), "Ok %s, deci esti baiat.", sendername);

    SendClientMessage(playerid, 0xA51C00FF, string);

    RegistrationStep[playerid] = 2;

    SetPlayerSkin(playerid, 48);

    SendClientMessage(playerid, 0x796B00FF, "Care este data ta de nastere? [ zi/luna/an ]");

    return 0;

}

else if((strcmp("fata", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Fata")))

{

                GetPlayerName(playerid, sendername, sizeof(sendername));

    PlayerInfo[playerid][pSex] = 2;

    format(string, sizeof(string), "Ok %s, deci esti fata.", sendername);

    SendClientMessage(playerid, 0xA51C00FF, string);

    RegistrationStep[playerid] = 2;

    SetPlayerSkin(playerid, 178);

    SendClientMessage(playerid, 0x796B00FF, "Care este data ta de nastere? [ zi/luna/an ]");

    return 0;

}

else

{

    SendClientMessage(playerid, 0x796B00FF, "Ce esti? [ Baiat sau Fata ]");

}

return 0;

}

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, 0x796B00FF, "Care este data ta de nastere? [ zi/luna/an ]");

    return 0;

}

new check = year - strvalEx(DateInfo[2]);

if(check == year)

{

    SendClientMessage(playerid, 0x796B00FF, "Care este data ta de nastere? [ zi/luna/an ]");

    return 0;

}

if(strvalEx(DateInfo[1]) > month)

{

    check -= 1;

}

else if(strvalEx(DateInfo[1]) == month && strvalEx(DateInfo[0]) > day)

{

    check -= 1;

}

PlayerInfo[playerid]


= check;

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "Ok %s, deci ai %d ani.", sendername, PlayerInfo[playerid]


);

SendClientMessage(playerid, 0xA51C00FF, string);

RegistrationStep[playerid] = 3;

      SendClientMessage(playerid, 0x796B00FF, "Unde vrei sa fii spawnat? [ LS(LosSantos) sau SF(San Fiero) ]");

return 0;

    }

    else if(RegistrationStep[playerid] == 3)

    {

        new idx;

    tmp = strtok(text, idx);

    if((strcmp("ls", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("ls")))

{

    PlayerInfo[playerid][pOrigin] = 1;

    SendClientMessage(playerid, 0xA51C00FF, "Ok, tu vei fi spawnat in Los Santos.");

    SendClientMessage(playerid, 0x82B3FF, "Este timpul pentru tutorial. Poti da /skip sa treci peste el.");

RegistrationStep[playerid] = 0;

    TutTime[playerid] = 1;

    return 0;

}[/pawn]

Inainte sa lasati comm-uri cum ca am copiat bla/bla recunosc, nu este sv meu e GM edit.Totusi am nevoie de ajutor, daca vreti ma ajutati daca nu , nu  ;)

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.