PLEASE HELP ME, Y_INI BUG?! -
maksicnm - 22.10.2017
There was a bug with timers in script, i fixed them and before them i can register and login, but i fixed them and this is how it looks:
Registering a new acc:
Player input pass into dialog, console print Pass : 0 (I add printf to test)
Why is that Happenning??
Here is DIALOG_REGISTER code..
Код HTML:
switch (dialogid)
{
case DIALOG_REGISTER:
{
if(!response) return Kick(playerid);
if(response)
{
if(strlen(inputtext) < MIN_DUZINA_LOZINKE)
{
new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),""BELA"________________________________________________\n\n"LJUB"Dobrodosao na Afera Gaming RolePlay\n\nVase Ime i Prezime: "CRVENA"%s\n"BELA"Vas korisnicki racun nije registrovan...\nUpisite vasu lozinku da bi ste se registrovali\n\nLozinka: "CRVENA"Min 6/Max 26 znakova\n\n"BELA"________________________________________________",regname);
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,""BELA"Registracija",regstring,"Registracija","Izlaz");
SCM(playerid,-1,""LJUB"AG-RP | "BELA"Lozinka mora imati minimum 6 znakova, a maximum 26 znakova!");
}
else if(strlen(inputtext) > MAX_DUZINA_LOZINKE)
{
new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),""BELA"________________________________________________\n\n"LJUB"Dobrodosao na Afera Gaming RolePlay\n\nVase Ime i Prezime: "CRVENA"%s\n"BELA"Vas korisnicki racun nije registrovan...\nUpisite vasu lozinku da bi ste se registrovali\n\nLozinka: "CRVENA"Min 6/Max 26 znakova\n\n"BELA"________________________________________________",regname);
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,""BELA"Registracija",regstring,"Registracija","Izlaz");
SCM(playerid,-1,""LJUB"AG-RP | "BELA"Lozinka mora imati minimum 6 znakova, a maximum 26 znakova!");
}
else if(strlen(inputtext) >= MIN_DUZINA_LOZINKE && strlen(inputtext) <= MAX_DUZINA_LOZINKE)
{
new INI:File = INI_Open(Korisnici(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
printf("Pass: %d", PlayerInfo[playerid][pPass]);
INI_WriteInt(File,"NovacDzep",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Ubistava",0);
INI_WriteInt(File,"Smrti",0);
INI_WriteInt(File,"Level",1);
INI_WriteInt(File,"GameMaster",0);
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"Godine",0);
INI_WriteInt(File,"Drzava",0);
INI_WriteInt(File,"Pol",0);
INI_WriteInt(File,"Tutorial",0);
INI_WriteInt(File,"Email",0);
INI_WriteInt(File,"Lider",0);
INI_WriteInt(File,"Clan",0);
INI_WriteInt(File,"Rank",0);
INI_WriteInt(File,"Mutiran",0);
INI_WriteInt(File,"NovacBanka",0);
INI_WriteInt(File,"Warn",0);
INI_WriteInt(File,"BankovniRacun",0);
INI_WriteInt(File,"Zatvor",0);
INI_WriteInt(File,"ZatvorenVreme",0);
INI_WriteInt(File,"Respekti",0);
INI_WriteInt(File,"UhapsenPuta",0);
INI_WriteInt(File,"Droga",0);
INI_WriteInt(File,"Mats",0);
INI_WriteInt(File,"PayDayPoeni",0);
INI_WriteInt(File,"SatiIgre",0);
INI_WriteInt(File,"IznosRate",0);
INI_WriteInt(File,"IznosKredita",0);
INI_WriteInt(File,"PreostaloZaOtplatu",0);
INI_WriteInt(File,"ADozvola",0);
INI_WriteInt(File,"KamionDozvola",0);
INI_WriteInt(File,"AvionDozvola",0);
INI_WriteInt(File,"MotorDozvola",0);
INI_WriteInt(File,"BrodDozvola",0);
INI_WriteInt(File,"GunDozvola",0);
INI_WriteInt(File,"PosedovanjeFirme",-1);
INI_WriteInt(File,"Mobilni",0);
INI_WriteInt(File,"Imenik",0);
INI_WriteInt(File,"MobKredit",0);
INI_WriteInt(File,"Cigare",0);
INI_WriteInt(File,"Upaljac",0);
INI_WriteInt(File,"Kanap",0);
INI_WriteInt(File,"Naocare",0);
INI_WriteInt(File,"Sat",0);
INI_WriteInt(File,"BorbeniStil",4);
INI_WriteInt(File,"Posao",0);
INI_WriteInt(File,"Hrana",0);
INI_WriteInt(File,"PosedovanjeKuce",-1);
INI_WriteInt(File,"ProveraSpawna",0);
INI_WriteInt(File,"Rent",-1);
INI_WriteInt(File,"PosedovanjeStana",-1);
INI_WriteInt(File,"PosedovanjeVikendice",-1);
INI_WriteInt(File,"OrgUgovor",0);
INI_WriteInt(File,"PosaoUgovor",0);
INI_WriteInt(File,"PosedovanjeAuta",-1);
INI_WriteInt(File,"DzeparosVreme",0);
INI_WriteInt(File,"PosedovanjeMotora",-1);
INI_WriteInt(File,"Kaciga",-1);
INI_WriteInt(File,"PosedovanjeBicikla",-1);
INI_WriteInt(File,"PosedovanjeAviona",-1);
INI_WriteInt(File,"PosedovanjePlovila",-1);
INI_WriteInt(File,"pZlato",0);
INI_WriteInt(File,"pPromoter",0);
INI_WriteInt(File,"Vip",0);
INI_WriteInt(File,"UzeoPaket",0);
INI_WriteInt(File,"Ranac",0);
INI_WriteInt(File,"RegistracijaNivo",1);
INI_Close(File);
PlayerInfo[playerid][pNovacBanka] = 0; PlayerInfo[playerid][pNovacDzep] = 50000; GivePlayerMoney(playerid, PlayerInfo[playerid][pNovacDzep]);
new string[128];
format(string,sizeof(string),""LJUB""LJUB"AG-RP | "BELA"Uspesno ste se registrovali | Vasa lozinka je: "LJUB"%s",inputtext);
SCM(playerid,-1,string); PlayerInfo[playerid][pLevel] = 1;
ULozinka[playerid] = 1;
//ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, ""BELA"Dali ste musko ili zensko?", ""LJUB"- "BELA"Musko\n"LJUB"- "BELA"Zensko", "Dalje", "Odustani");
}
}
}
Text what else you need
Here is enum pInfo too....
Код HTML:
enum pInfo
{
pPass,
pNovacDzep,
pAdmin,
pGM,
pUbistava,
pSmrti,
pLevel,
pSkin,
pGodine,
pDrzava,
pSex,
pTutorial,
pEmail[128],
pLider,
pClan,
pRank,
pMutiran,
pNovacBanka,
pWarn,
pBankovniRacun,
pZatvor,
pZatvorenVreme,
pExp,
pPozvan,
pTrazeniLevel,
pUhapsenPuta,
pDroga,
pMats,
pPayDayPoeni,
pSatiIgre,
pIznosRate,
pIznosKredita,
pPreostaloZaOtplatu,
pADozvola,
pKamionDozvola,
pAvionDozvola,
pMotorDozvola,
pBrodDozvola,
pGunDozvola,
pPosedovanjeFirme,
pMobilni,
pImenik,
pMobKredit,
pCigare,
pUpaljac,
pKanap,
pNaocare,
pSat,
pBorbeniStil,
pPosao,
pHrana,
pPosedovanjeKuce,
pProveraSpawna,
pRent,
pPosedovanjeStana,
pPosedovanjeVikendice,
pOrgUgovor,
pPosaoUgovor,
pPosedovanjeAuta,
pDzeparosVreme,
pPosedovanjeMotora,
pKaciga,
pPosedovanjeBicikla,
pPosedovanjeAviona,
pPosedovanjePlovila,
pZlato,
pPromoter,
pVip,
pUzeoPaket,
pImaRanac,
/*oSlot1,
oSlot2,
oSlot3,
oSlot4,
oSlot5,
oSlot6,
oSlot7,
oSlot8,
oSlot9,
oSlot10,
oSlot11,
oSlot12,
oSlot13,
*/
pRegistracijaNivo
}
OnPlayerClickPlayertextdraw...
Код HTML:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == RegisterTD[35][playerid])
{
new regstring[512], regname[64]; GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),""BELA"________________________________________________\n\n"LJUB"Dobrodosao na Afera Gaming RolePlay\n\nVase Ime i Prezime: "CRVENA"%s\n"BELA"Vas korisnicki racun nije registrovan...\nUpisite vasu lozinku da bi ste se registrovali\n\nLozinka: "CRVENA"Min 6/Max 26 znakova\n\n"BELA"________________________________________________",regname);
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,""BELA"Registracija",regstring,"Registracija","Izlaz");
return 1;
}
if(playertextid == RegisterTD[36][playerid])
{
ShowPlayerDialog(playerid, 12, 1, ""BELA"Email", ""BELA"Unos email-a\n"LJUB"U prazno polje ispod unesite vasu email adresu\n\n"BELA"Zamolili bih vas da unesete tacan email", "Dalje", "Odustani");
return 1;
}
if(playertextid == RegisterTD[38][playerid])
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, ""BELA"Odakle ste ?", ""LJUB"- "BELA"Srbija\n"LJUB"- "BELA"Bosna i Hercegovina\n"LJUB"- "BELA"Republika Srpska\n"LJUB"- "BELA"Crna Gora\n"LJUB"- "BELA"Hrvatska\n"LJUB"- "BELA"Makedonija\n"LJUB"- "BELA"Slovenija\n"LJUB"- "BELA"Ostalo", "Dalje", "Odustani");
return 1;
}
if(playertextid == RegisterTD[37][playerid])
{
ShowPlayerDialog(playerid, 4, 1, ""BELA"Koliko imate godina?", ""LJUB"U prazno polje ispod upisi koliko imas godina\n\n"BELA"Godine upisi brojem\n"CRVENA"Nemojte ici ispod 7 i vise od 60!", "Dalje", "Odustani");
return 1;
}
if(playertextid == RegisterTD[43][playerid])
{
PlayerInfo[playerid][pSex] = 1;
SCM(playerid, -1, ""LJUB"[REGISTRACIJA] "BELA"Uredu, Vi ste MUSKO.");
USpol[playerid] = 1;
return 1;
}
if(playertextid == RegisterTD[44][playerid])
{
PlayerInfo[playerid][pSex] = 2;
SCM(playerid, -1, ""LJUB"[REGISTRACIJA] "BELA"Uredu, Vi ste ZENSKO <3.");
USpol[playerid] = 1;
return 1;
}
if(playertextid == RegisterTD[45][playerid])
{
if( ULozinka[ playerid ] == false ) return SCM( playerid,-1, ""CRVENA"[GRESKA]"BELA"Nisi odabrao lozinku." );
if( UDrzava[ playerid ] == false ) return SCM( playerid,-1, ""CRVENA"[GRESKA]"BELA"Nisi odabrao poreklo." );
if( UGodine[ playerid ] == false ) return SCM( playerid,-1, ""CRVENA"[GRESKA]"BELA"Nisi odabrao godine starosti." );
if( UMail[ playerid ] == false ) return SCM( playerid,-1, ""CRVENA"[GRESKA]"BELA"Nisi uneo email." );
if( USpol[ playerid ] == false ) return SCM( playerid,-1, ""CRVENA"[GRESKA]"BELA"Nisi odabrao spol." );
CancelSelectTextDraw( playerid );
KreirajRegister(playerid);
new uspesnareg[400];
format(uspesnareg,sizeof(uspesnareg),""BELA"Kliknite 'REGISTER' ako se zelite registrirati na server");
ShowPlayerDialog(playerid,22,DIALOG_STYLE_MSGBOX,""CRVENA"Registracija",uspesnareg,"Register","Izadji");
PlayerInfo[playerid][pRegistracijaNivo] = 1;
UlogovanProvera[playerid] = 1;
SavePlayer(playerid);
return 1;
}
...
IF U NEED MORE CODE, REPLY!!!
Re: PLEASE HELP ME, Y_INI BUG?! -
maksicnm - 22.10.2017
Fixed on weird way but fixed