Wysłany: 2012-10-19, 15:30
_Chada_
' Ce Ha A De A '
Wiek: 30 Na forum: 5261 dni Posty: 14
Nick w MP: Brak
Piwa : 83
Siemanko, mam problem z rejestracj? w GameModzie Rustic-RP. ?ci?gn??em go z dzia?u, kupi?em sms'em resources i tak dalej i tak dalej, ale pojawi? si? problem.
Kod rejestrowania postaci by? POROZPIEPRZANY dos?ownie. Mniej wi?cej uporz?dkowa?em dialogi i wszystkie dzia?aj? pr?cz pierwszego - a co za tym idzie nie da rady i?? dalej...
Chodzi o dialog 1 - czyli wpisywanie imienia i nazwiska. Kiedy wpisujesz imie spacja nazwisko - nic si? nie dzieje, dialog si? od?wie?a i mo?na wpisywa? tak bez ko?ca. O co tutaj mo?e chodzi? ? O to kod:
Kod: else if(dialogid == 9502)
{
new imie[12],nazwisko[12],postac[50],global[50];
if(!response) return LogMenu(playerid);
if(sscanf(inputtext, "s[12]s[12]", imie,nazwisko)) return dShowPlayerDialog(playerid, 9502, DIALOG_STYLE_INPUT, ""servname"Postacie", "Witaj w kreatorze tworzenia postaci.\nMo?esz tutaj za?o?y? swoje trzy postacie, kt?re b?d? przypisane do tego konta globalnego.\n[Imi? postaci] [Nazwisko postaci]","Dalej","Anuluj");
if(strval(imie)>12||strval(nazwisko)>12) return dShowPlayerDialog(playerid, 9502, DIALOG_STYLE_INPUT, ""servname"Postacie", "{FFFFFF}Maksymalna liczba znak?w w imieniu to 12. Podobnie jest w nazwisku. Popraw te b??dy.\nWitaj w kreatorze tworzenia postaci.\nMo?esz tutaj za?o?y? swoje trzy postacie, kt?re b?d? przypisane do tego konta globalnego.\n[Imi? postaci] [Nazwisko postaci]","Dalej","Anuluj");
format(String, sizeof(String), "%s_%s",imie,nazwisko);
format(postac, sizeof(postac), "Konta/Postacie/%s.ini",String);
format(global, sizeof(global), "Konta/Globalne/%s.ini",String);
if(DOF2_FileExists(postac))
{
format(String, sizeof(String), "~>~ ~>~ Taka postac zostala juz stworzona.");
TextDrawSetString(Textdraw7[playerid], String);
TextDrawShowForPlayer(playerid, Textdraw7[playerid]);
return LogMenu(playerid);
}
if(DOF2_FileExists(global))
{
Tip(playerid, "Kt?ry? z graczy za?o?y? ju? konto globalne o podobnym nicku, nie mo?esz u?y? tego, wr?? do menu i wpisz now? nazw?.");
return LogMenu(playerid);
}
strmid(Nick2[playerid],String, 0, 64, 64);
SetPlayerName(playerid, Nick2[playerid]);
PlayerInfo[playerid][pKonto]=true;
PlayerInfo[playerid][pPremium]=0;
PlayerInfo[playerid][pPrzejechane]=0;
PlayerInfo[playerid][pBW]=0;
PlayerInfo[playerid][pJail]=0;
PlayerInfo[playerid][pGodziny]=0;
PlayerInfo[playerid][pMinuty]=0;
PlayerInfo[playerid][pHP]=100.0;
PlayerInfo[playerid][pUzaleznienie]=0;
PlayerInfo[playerid][pKasa]=GameMode[uKasaStart];
PlayerInfo[playerid][pBank]=0;
PlayerInfo[playerid][pPlec]=0;
PlayerInfo[playerid][pWiek]=0;
PlayerInfo[playerid][pSkin]=0;
PlayerInfo[playerid][pSpawn]=0;
PlayerInfo[playerid][pOrg]=0;
PlayerInfo[playerid][pOrgLider]=0;
PlayerInfo[playerid][pSkinOrg]=0;
PlayerInfo[playerid][pWyplata]=0;
PlayerInfo[playerid][pWyplataBiz]=0;
PlayerInfo[playerid][pPayDayOrg]=99;
PlayerInfo[playerid][pPayDayBiz]=99;
PlayerInfo[playerid][pDutyOrg]=0;
PlayerInfo[playerid][pDutyBiz]=0;
PlayerInfo[playerid][pPraca]=0;
PlayerInfo[playerid][pUID]=0;
PlayerInfo[playerid][pPrawko]=false;
PlayerInfo[playerid][pMetryczka]=false;
PlayerInfo[playerid][pZezwolenie]=false;
PlayerInfo[playerid][pPozwolenie]=false;
PlayerInfo[playerid][pBiz]=0;
PlayerInfo[playerid][pBizLider]=0;
PlayerInfo[playerid][pBizSkin]=0;
PlayerInfo[playerid][pKarne]=0;
PlayerInfo[playerid][pStylWalki]=4;
PlayerInfo[playerid][pSila]=50;
PlayerInfo[playerid][pStyl]=0;
PlayerInfo[playerid][pOstatniTrening]=0;
PlayerInfo[playerid][pTelefon]=0;
PlayerInfo[playerid][pUprawnienia]=0;
PlayerInfo[playerid][pUprawnienia1]=0;
PlayerInfo[playerid][pUmiejetnosc]=0;
PlayerInfo[playerid][pUmiejetnosc1]=0;
PlayerInfo[playerid][pUmiejetnosc2]=0;
PlayerInfo[playerid][pTW]=0;
PlayerInfo[playerid][pPayDayJob]=0;
PlayerInfo[playerid][pBU]=0;
//grupy
PlayerInfo[playerid][pGrupa1]=0;
PlayerInfo[playerid][pGrupa2]=0;
PlayerInfo[playerid][pGrupa3]=0;
PlayerInfo[playerid][pPDGrupa1]=0;
PlayerInfo[playerid][pPDGrupa2]=0;
PlayerInfo[playerid][pPDGrupa3]=0;
PlayerInfo[playerid][pOPDGrupa1]=0;
PlayerInfo[playerid][pOPDGrupa2]=0;
PlayerInfo[playerid][pOPDGrupa3]=0;
PlayerInfo[playerid][pGrupaWyplata1]=0;
PlayerInfo[playerid][pGrupaWyplata2]=0;
PlayerInfo[playerid][pGrupaWyplata3]=0;
strmid(PlayerInfo[playerid][pGrupaRanga1],"brak", 0, 32, 32);
strmid(PlayerInfo[playerid][pGrupaRanga2],"brak", 0, 32, 32);
strmid(PlayerInfo[playerid][pGrupaRanga3],"brak", 0, 32, 32);
PlayerInfo[playerid][pGrupaLider1]=0;
PlayerInfo[playerid][pGrupaLider2]=0;
PlayerInfo[playerid][pGrupaLider3]=0;
PlayerInfo[playerid][pUGrupa1]=0;
PlayerInfo[playerid][pUGrupa2]=0;
PlayerInfo[playerid][pUGrupa3]=0;
GraczSieRejestruje(playerid);
return 1;
}
Prosz? o pomoc, stawiam piwka !
Wysłany: 2012-10-19, 16:59
Raydex
Wiek: 36 Na forum: 6037 dni Posty: 138
Piwa : 1043
Zapodaj funkcje GraczSieRejestruje.
Wysłany: 2012-10-19, 17:05
_Chada_
' Ce Ha A De A '
Wiek: 30 Na forum: 5261 dni Posty: 14
Nick w MP: Brak
Piwa : 83
Podam, ale mi si? wydaje ?e to nie tu. Bo do 'GraczSieRejestruje' nawet nie dochodzi. Ta funkcja odpala si? dopiero gdy wczyta wpisane imie i nazwisko. A dialog si? od?wie?a i nic si? nie dzieje dalej.
Kod: GraczSieRejestruje(playerid)
{
Data();
new h,m,s;
gettime(h,m,s);
if(IsPlayerConnected(playerid)&&Zalogowany[playerid]==false)
{
new file[40];
format(file,sizeof(file),"Konta/Postacie/%s.ini",Nick2[playerid]);
DOF2_CreateFile(file);
DOF2_SetInt(file,"Konto",PlayerInfo[playerid][pKonto]);
DOF2_SetFloat(file,"Przejechane",PlayerInfo[playerid][pPrzejechane]);
DOF2_SetInt(file,"BW",PlayerInfo[playerid][pBW]);
DOF2_SetInt(file,"Jail",PlayerInfo[playerid][pJail]);
DOF2_SetInt(file,"Godziny",PlayerInfo[playerid][pGodziny]);
DOF2_SetInt(file,"Minuty",PlayerInfo[playerid][pMinuty]);
DOF2_SetFloat(file,"Zycie",PlayerInfo[playerid][pHP]);
DOF2_SetInt(file,"Uzaleznienie",PlayerInfo[playerid][pUzaleznienie]);
DOF2_SetInt(file,"Kasa",PlayerInfo[playerid][pKasa]);
DOF2_SetInt(file,"Bank",PlayerInfo[playerid][pBank]);
DOF2_SetInt(file,"Plec",PlayerInfo[playerid][pPlec]);
DOF2_SetInt(file,"Wiek",PlayerInfo[playerid][pWiek]);
DOF2_SetInt(file,"Rasa",PlayerInfo[playerid][pRasa]);
DOF2_SetInt(file,"Skin",PlayerInfo[playerid][pSkin]);
DOF2_SetInt(file,"Karne",PlayerInfo[playerid][pKarne]);
DOF2_SetInt(file,"StylWalki",PlayerInfo[playerid][pStylWalki]);
DOF2_SetInt(file,"Sila",PlayerInfo[playerid][pSila]);
DOF2_SetInt(file,"Spawn",PlayerInfo[playerid][pSpawn]);
DOF2_SetInt(file,"SpawnID",PlayerInfo[playerid][pSpawnID]);
DOF2_SetFloat(file,"PosX",PlayerInfo[playerid][pPosX]);
DOF2_SetFloat(file,"PosY",PlayerInfo[playerid][pPosY]);
DOF2_SetFloat(file,"PosZ",PlayerInfo[playerid][pPosZ]);
DOF2_SetInt(file,"Int",PlayerInfo[playerid][pInt]);
DOF2_SetInt(file,"Vir",PlayerInfo[playerid][pVir]);
DOF2_SetInt(file,"Frakcja",PlayerInfo[playerid][pOrg]);
DOF2_SetInt(file,"Lider",PlayerInfo[playerid][pOrgLider]);
DOF2_SetString(file,"Ranga",PlayerInfo[playerid][pRanga]);
DOF2_SetInt(file,"SkinOrg",PlayerInfo[playerid][pSkinOrg]);
DOF2_SetInt(file,"DutyOrg",PlayerInfo[playerid][pDutyOrg]);
DOF2_SetInt(file,"DutyBiz",PlayerInfo[playerid][pDutyBiz]);
DOF2_SetInt(file,"Biznes",PlayerInfo[playerid][pBiz]);
DOF2_SetInt(file,"BiznesLider",PlayerInfo[playerid][pBizLider]);
DOF2_SetString(file,"BiznesRanga",PlayerInfo[playerid][pBizRanga]);
DOF2_SetInt(file,"BiznesSkin",PlayerInfo[playerid][pBizSkin]);
DOF2_SetInt(file,"Praca",PlayerInfo[playerid][pPraca]);
DOF2_SetInt(file,"UID",PlayerInfo[playerid][pUID]);
DOF2_SetBool(file,"Prawko",PlayerInfo[playerid][pPrawko]);
DOF2_SetBool(file,"Metryczka",PlayerInfo[playerid][pMetryczka]);
DOF2_SetBool(file,"Zezwolenie",PlayerInfo[playerid][pZezwolenie]);
DOF2_SetBool(file,"Pozwolenie",PlayerInfo[playerid][pPozwolenie]);
DOF2_SetInt(file,"Styl",PlayerInfo[playerid][pStyl]);
DOF2_SetInt(file,"Meble",PlayerInfo[playerid][pMeble]);
DOF2_SetInt(file,"Czyste",PlayerInfo[playerid][pCzyste]);
DOF2_SetInt(file,"Telefon",PlayerInfo[playerid][pTelefon]);
DOF2_SetInt(file,"Czat",PlayerInfo[playerid][pUprawnienia]);
DOF2_SetInt(file,"Pojazdy",PlayerInfo[playerid][pUprawnienia1]);
DOF2_SetInt(file,"Umiejetnosc",PlayerInfo[playerid][pUmiejetnosc]);
DOF2_SetInt(file,"Umiejetnosc1",PlayerInfo[playerid][pUmiejetnosc1]);
DOF2_SetInt(file,"Umiejetnosc2",PlayerInfo[playerid][pUmiejetnosc2]);
DOF2_SetFloat(file,"PosJailX",PlayerInfo[playerid][pPosJailX]);
DOF2_SetFloat(file,"PosJailY",PlayerInfo[playerid][pPosJailY]);
DOF2_SetFloat(file,"PosJailZ",PlayerInfo[playerid][pPosJailZ]);
DOF2_SetInt(file,"PayDayOrg",PlayerInfo[playerid][pPayDayOrg]);
DOF2_SetInt(file,"PayDayBiz",PlayerInfo[playerid][pPayDayBiz]);
DOF2_SetInt(file,"WyplataBiz",PlayerInfo[playerid][pWyplataBiz]);
DOF2_SetInt(file,"Wyplata",PlayerInfo[playerid][pWyplata]);
DOF2_SetInt(file,"PayDayJob",PlayerInfo[playerid][pPayDayJob]);
DOF2_SetInt(file,"TreningiWalki",PlayerInfo[playerid][pTW]);
DOF2_SetInt(file,"OstatniTrening",PlayerInfo[playerid][pOstatniTrening]);
DOF2_SetInt(file,"BiznesUprawnienia",PlayerInfo[playerid][pBU]);
//grupy
DOF2_SetInt(file,"Grupa1",PlayerInfo[playerid][pGrupa1]);
DOF2_SetInt(file,"Grupa2",PlayerInfo[playerid][pGrupa2]);
DOF2_SetInt(file,"Grupa3",PlayerInfo[playerid][pGrupa3]);
DOF2_SetInt(file,"PDGrupa1",PlayerInfo[playerid][pPDGrupa1]);
DOF2_SetInt(file,"PDGrupa2",PlayerInfo[playerid][pPDGrupa2]);
DOF2_SetInt(file,"PDGrupa3",PlayerInfo[playerid][pPDGrupa3]);
DOF2_SetInt(file,"OPDGrupa1",PlayerInfo[playerid][pOPDGrupa1]);
DOF2_SetInt(file,"OPDGrupa2",PlayerInfo[playerid][pOPDGrupa2]);
DOF2_SetInt(file,"OPDGrupa3",PlayerInfo[playerid][pOPDGrupa3]);
DOF2_SetString(file,"GrupaRanga1",PlayerInfo[playerid][pGrupaRanga1]);
DOF2_SetString(file,"GrupaRanga2",PlayerInfo[playerid][pGrupaRanga2]);
DOF2_SetString(file,"GrupaRanga3",PlayerInfo[playerid][pGrupaRanga3]);
DOF2_SetInt(file,"GrupaWyplata1",PlayerInfo[playerid][pGrupaWyplata1]);
DOF2_SetInt(file,"GrupaWyplata2",PlayerInfo[playerid][pGrupaWyplata2]);
DOF2_SetInt(file,"GrupaWyplata3",PlayerInfo[playerid][pGrupaWyplata3]);
DOF2_SetInt(file,"GrupaLider1",PlayerInfo[playerid][pGrupaLider1]);
DOF2_SetInt(file,"GrupaLider2",PlayerInfo[playerid][pGrupaLider2]);
DOF2_SetInt(file,"GrupaLider3",PlayerInfo[playerid][pGrupaLider3]);
DOF2_SetInt(file,"UGrupa1",PlayerInfo[playerid][pUGrupa1]);
DOF2_SetInt(file,"UGrupa2",PlayerInfo[playerid][pUGrupa2]);
DOF2_SetInt(file,"UGrupa3",PlayerInfo[playerid][pUGrupa3]);
DOF2_SaveFile();
}
dShowPlayerDialog(playerid,17,DIALOG_STYLE_INPUT,""servname"Rejestracja","{FFFFFF}Podaj wiek odgrywanej postaci:","Dalej","");
PlayerInfo[playerid][pHP]=100;
PlayerInfo[playerid][pUID]=GameMode[uPostacie];
PlayerInfo[playerid][pWyplata]=0;
PlayerInfo[playerid][pWyplataBiz]=0;
PlayerInfo[playerid][pDutyOrg]=0;
PlayerInfo[playerid][pDutyBiz]=0;
PlayerInfo[playerid][pPayDayOrg]=99;
PlayerInfo[playerid][pPayDayBiz]=99;
PlayerInfo[playerid][pPayDayJob]=99;
GameMode[uPostacie]++;
Global[playerid][gPostacie]++;
format(String, sizeof(String), "[CharCreate] %s (UID: %d, IP: %s, Owner: %s, gUID: %d)",Nick2[playerid],PlayerInfo[playerid][pUID],dIP[playerid],Global[playerid][gNick],Global[playerid][gUID]);
CharUID(String);
if(!strcmp("brak", Global[playerid][gPostac1]))
{
strmid(Global[playerid][gPostac1],Nick2[playerid], 0, 64, 64);
return 1;
}
if(!strcmp("brak", Global[playerid][gPostac2]))
{
strmid(Global[playerid][gPostac2],Nick2[playerid], 0, 64, 64);
return 1;
}
if(!strcmp("brak", Global[playerid][gPostac3]))
{
strmid(Global[playerid][gPostac3],Nick2[playerid], 0, 64, 64);
return 1;
}
if(!strcmp("brak", Global[playerid][gPostac4]))
{
strmid(Global[playerid][gPostac4],Nick2[playerid], 0, 64, 64);
return 1;
}
if(!strcmp("brak", Global[playerid][gPostac5]))
{
strmid(Global[playerid][gPostac5],Nick2[playerid], 0, 64, 64);
return 1;
}
return 1;
}
[ Dodano : 2012-10-20, 11:11 ]
Od?wie?am, pomocy !
[ Dodano : 2012-10-20, 16:04 ]
Dobra do kosza, na pawno mi pomogli.
Tagi: rejestracja :: rustic-rp
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: