Citat: Nexy AG poslato Avgust 24, 2017, 20:39:02 POSLE PODNE
Gde ti je INI_WrieInt?
[pawn]//////////////////////////////////////////////////////////////////////////////// Private
private UcitajKorisnike(playerid, name[], value[])
{
INI_String("Password", PlayerInfo[playerid][pPassword], 129);
INI_Int("Novac", PlayerInfo[playerid][pNovac]);
INI_Int("Level", PlayerInfo[playerid][pLevel]);
INI_Int("Smrti", PlayerInfo[playerid][pSmrti]);
INI_Int("Ubistva", PlayerInfo[playerid][pUbistva]);
INI_Int("Admin", PlayerInfo[playerid][pAdmin]);
INI_Int("StaffSlot", PlayerInfo[playerid][pStaffSlot]);
INI_Int("AdminVrsta", PlayerInfo[playerid][pAdminVrsta]);
INI_Int("GMVrsta", PlayerInfo[playerid][pGMVrsta]);
INI_Int("SnimanjeRacuna", PlayerInfo[playerid][pSnimanjeRacuna]);
INI_Int("Drzava", PlayerInfo[playerid][pDrzava]);
INI_Int("Godine", PlayerInfo[playerid][pGodine]);
INI_Int("Pol", PlayerInfo[playerid][pPol]);
INI_Int("Spawn", PlayerInfo[playerid][pSpawn]);
INI_String("Email", PlayerInfo[playerid][pEmail], 80);
INI_Int("Skin", PlayerInfo[playerid][pSkin]);
INI_Int("Tutorial", PlayerInfo[playerid][pTutorial]);
INI_Int("Banovan", PlayerInfo[playerid][pBanovan]);
INI_String("BRazlog", PlayerInfo[playerid][pBRazlog], 40);
INI_Int("Zatvor", PlayerInfo[playerid][pZatvor]);
INI_Int("ZatvorVreme", PlayerInfo[playerid][pZatvorVreme]);
INI_Int("GameMaster", PlayerInfo[playerid][pGM]);
INI_Int("Posao", PlayerInfo[playerid][pPosao]);
INI_Int("PosaoUgovor", PlayerInfo[playerid][pPosaoUgovor]);
INI_Int("PosaoVreme", PlayerInfo[playerid][pPosaoVreme]);
INI_Int("NovacBanka", PlayerInfo[playerid][pNovacBanka]);
INI_Int("Mutiran", PlayerInfo[playerid][pMutiran]);
INI_String("Kartica", PlayerInfo[playerid][pKartica], 20);
INI_Int("KarticaPin", PlayerInfo[playerid][pKarticaPin]);
INI_Int("IznosRate", PlayerInfo[playerid][pIznosRate]);
INI_Int("IznosKredita", PlayerInfo[playerid][pIznosKredita]);
INI_Int("PreostaloZaOtplatu", PlayerInfo[playerid][pPreostaloZaOtplatu]);
INI_Int("Zlato", PlayerInfo[playerid][pZlato]);
INI_Int("Promoter", PlayerInfo[playerid][pPromoter]);
INI_Int("Igrac_Kaznjen", PlayerInfo[playerid][pIgrac_Kaznjen]);
INI_Int("Glad_Igraca", PlayerInfo[playerid][pGlad_Igraca]);
return 1;
}
////////////////////////////////////////////////////////////////////////////////[/pawn]
Citat: Nexy AG poslato Avgust 24, 2017, 20:47:02 POSLE PODNE
To je da ucita,, gde je da sacuva :D
[pawn]//////////////////////////////////////////////////////////////////////////////// Stock
stock SacuvajKorisnike(playerid)
{
if(PlayerInfo[playerid][pSnimanjeRacuna] != 0)
{
new StrText[80];
format(StrText, 80, KORISNICI_FILE, GetName(playerid));
if(fexist(StrText))
{
new INI:PlayerFile = INI_Open(StrText);
INI_WriteString(PlayerFile, "Password", PlayerInfo[playerid][pPassword]);
INI_WriteInt(PlayerFile, "Novac", PlayerInfo[playerid][pNovac]);
INI_WriteInt(PlayerFile, "Level", PlayerInfo[playerid][pLevel]);
INI_WriteInt(PlayerFile, "Smrti", PlayerInfo[playerid][pSmrti]);
INI_WriteInt(PlayerFile, "Ubistva", PlayerInfo[playerid][pUbistva]);
INI_WriteInt(PlayerFile, "Admin", PlayerInfo[playerid][pAdmin]);
INI_WriteInt(PlayerFile, "StaffSlot", PlayerInfo[playerid][pStaffSlot]);
INI_WriteInt(PlayerFile, "AdminVrsta", PlayerInfo[playerid][pAdminVrsta]);
INI_WriteInt(PlayerFile, "GMVrsta", PlayerInfo[playerid][pGMVrsta]);
INI_WriteInt(PlayerFile, "SnimanjeRacuna", PlayerInfo[playerid][pSnimanjeRacuna]);
INI_WriteInt(PlayerFile, "Drzava", PlayerInfo[playerid][pDrzava]);
INI_WriteInt(PlayerFile, "Godine", PlayerInfo[playerid][pGodine]);
INI_WriteInt(PlayerFile, "Pol", PlayerInfo[playerid][pPol]);
INI_WriteInt(PlayerFile, "Spawn", PlayerInfo[playerid][pSpawn]);
INI_WriteString(PlayerFile, "Email", PlayerInfo[playerid][pEmail]);
INI_WriteInt(PlayerFile, "Skin", PlayerInfo[playerid][pSkin]);
INI_WriteInt(PlayerFile, "Tutorial", PlayerInfo[playerid][pTutorial]);
INI_WriteInt(PlayerFile, "Banovan", PlayerInfo[playerid][pBanovan]);
INI_WriteString(PlayerFile, "BRazlog", PlayerInfo[playerid][pBRazlog]);
INI_WriteInt(PlayerFile, "Zatvor", PlayerInfo[playerid][pZatvor]);
INI_WriteInt(PlayerFile, "ZatvorVreme", PlayerInfo[playerid][pZatvorVreme]);
INI_WriteInt(PlayerFile, "GameMaster", PlayerInfo[playerid][pGM]);
INI_WriteInt(PlayerFile, "Posao", PlayerInfo[playerid][pPosao]);
INI_WriteInt(PlayerFile, "PosaoUgovor", PlayerInfo[playerid][pPosaoUgovor]);
INI_WriteInt(PlayerFile, "PosaoVreme", PlayerInfo[playerid][pPosaoVreme]);
INI_WriteInt(PlayerFile, "NovacBanka", PlayerInfo[playerid][pNovacBanka]);
INI_WriteInt(PlayerFile, "Mutiran", PlayerInfo[playerid][pMutiran]);
INI_WriteString(PlayerFile, "Kartica", PlayerInfo[playerid][pKartica]);
INI_WriteInt(PlayerFile, "KarticaPin", PlayerInfo[playerid][pKarticaPin]);
INI_WriteInt(PlayerFile, "IznosRate", PlayerInfo[playerid][pIznosRate]);
INI_WriteInt(PlayerFile, "IznosKredita", PlayerInfo[playerid][pIznosKredita]);
INI_WriteInt(PlayerFile, "PreostaloZaOtplatu", PlayerInfo[playerid][pPreostaloZaOtplatu]);
INI_WriteInt(PlayerFile, "Zlato", PlayerInfo[playerid][pZlato]);
INI_WriteInt(PlayerFile, "Promoter", PlayerInfo[playerid][pPromoter]);
INI_WriteInt(PlayerFile, "Igrac_Kaznjen", PlayerInfo[playerid][pIgrac_Kaznjen]);
INI_WriteInt(PlayerFile, "Glad_Igraca", PlayerInfo[playerid][pGlad_Igraca]);
INI_Close(PlayerFile);
}
else
{
b_SCMF(playerid, -1, ""PPLAVA"[INFO] "BELA"Vase Ime_Prezime(%s) nije pronadjeno u bazi podataka i nije ga moguce sacuvati!", GetName(playerid));
SCM(playerid, -1, ""PPLAVA"[INFO] "BELA"Pozovite nekoga od admina i ne izlazite sa servera!");
}
}
return 1;
}
////////////////////////////////////////////////////////////////////////////////[/pawn]