( Pomoc ) Spremanje Akounta...

Započeo Alan ã‹¡, Jul 04, 2013, 12:28:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta : SL:RP

Imamo problem sa spremanjem akounta,znaci vecinom se spremi sve,ali nekada se ne spremi,samo se resetuje akount,na lvl 1 i 0 novac,neznam u cemu je problem,vecinom sprema ali nekad nece...

Korsitim ovu funkciju za spremanje...


stock SSACC(playerid)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteString(File,"Email",PlayerInfo[playerid][pEmail]);
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
INI_WriteInt(File,"Novcanik",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"GameSage",PlayerInfo[playerid][pGS]);
INI_WriteInt(File,"Ubistva",PlayerInfo[playerid][pUbistva]);
INI_WriteInt(File,"Smrti",PlayerInfo[playerid][pSmrti]);
INI_WriteInt(File,"OnlineSati",PlayerInfo[playerid][pOnlineSati]);
INI_WriteInt(File,"Pol",PlayerInfo[playerid][pPol]);
INI_WriteInt(File,"Poreklo",PlayerInfo[playerid][pPoreklo]);
// INI_WriteInt(File,"Mute",PlayerInfo[playerid][pMute]);
    INI_WriteInt(File,"pMute",PlayerInfo[playerid][pMute]);
    INI_WriteInt(File,"pMutiranVremena",PlayerInfo[playerid][pMutiranVremena]);
INI_WriteInt(File,"Registrovan",PlayerInfo[playerid][pRegistrovan]);
INI_WriteInt(File,"Telefon",PlayerInfo[playerid][pTelefon]);
INI_WriteInt(File,"BrojTelefona",PlayerInfo[playerid][pBrojTelefona]);
INI_WriteInt(File,"GPS",PlayerInfo[playerid][pGPS]);
INI_WriteInt(File,"DzeparosVreme",PlayerInfo[playerid][pDzeparosVreme]);
INI_WriteInt(File,"Posao",PlayerInfo[playerid][pPosao]);
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
INI_WriteInt(File,"OfflineBan",PlayerInfo[playerid][pOfflineBan]);
INI_WriteInt(File,"Lider",PlayerInfo[playerid][pLider]);
INI_WriteInt(File,"Clan",PlayerInfo[playerid][pClan]);
INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
INI_WriteInt(File,"Spawn",PlayerInfo[playerid][pSpawn]);
INI_WriteInt(File,"Oruzje1",PlayerInfo[playerid][pOruzje1]);
INI_WriteInt(File,"Oruzje2",PlayerInfo[playerid][pOruzje2]);
INI_WriteInt(File,"Oruzje3",PlayerInfo[playerid][pOruzje3]);
INI_WriteInt(File,"Oruzje4",PlayerInfo[playerid][pOruzje4]);
INI_WriteInt(File,"Municija1",PlayerInfo[playerid][pMunicija1]);
INI_WriteInt(File,"Municija2",PlayerInfo[playerid][pMunicija2]);
INI_WriteInt(File,"Municija3",PlayerInfo[playerid][pMunicija3]);
INI_WriteInt(File,"Municija4",PlayerInfo[playerid][pMunicija4]);
INI_WriteInt(File,"Imenik",PlayerInfo[playerid][pImenik]);
INI_WriteInt(File,"Rent",PlayerInfo[playerid][pRent]);
INI_WriteInt(File,"PosedovanjeKuce",PlayerInfo[playerid][pPosedovanjeKuce]);
INI_WriteInt(File,"pKucaKljuc",PlayerInfo[playerid][pKucaKljuc]);
INI_WriteInt(File,"PosedovanjeStana",PlayerInfo[playerid][pPosedovanjeStana]);
INI_WriteInt(File,"PosedovanjeVikendice",PlayerInfo[playerid][pPosedovanjeVikendice]);
INI_WriteInt(File,"PosedovanjeFirme",PlayerInfo[playerid][pPosedovanjeFirme]);
INI_WriteInt(File,"Reket",PlayerInfo[playerid][pReket]);
INI_WriteInt(File,"MestoUOrg",PlayerInfo[playerid][pMestoUOrg]);
INI_WriteInt(File,"Respekti",PlayerInfo[playerid][pRespekti]);
INI_WriteInt(File,"PayDayPoeni",PlayerInfo[playerid][pPayDayPoeni]);
INI_WriteInt(File,"Vozilo",PlayerInfo[playerid][pVozilo]);
INI_WriteInt(File,"Motor",PlayerInfo[playerid][pMotor]);
INI_WriteInt(File,"Letelica",PlayerInfo[playerid][pLetelica]);
INI_WriteInt(File,"Bicikla",PlayerInfo[playerid][pBicikla]);
INI_WriteInt(File,"Plovilo",PlayerInfo[playerid][pPlovilo]);
INI_WriteInt(File,"VIP",PlayerInfo[playerid][pVIP]);
INI_WriteInt(File,"VIPBodovi",PlayerInfo[playerid][pVIPBodovi]);
INI_WriteInt(File,"OrgUgovor",PlayerInfo[playerid][pOrgUgovor]);
INI_WriteInt(File,"OrgKazna",PlayerInfo[playerid][pOrgKazna]);
INI_WriteInt(File,"PosaoUgovor",PlayerInfo[playerid][pPosaoUgovor]);
INI_WriteInt(File,"UgasenTelefon",PlayerInfo[playerid][pUgasenTelefon]);
INI_WriteInt(File,"Banka",PlayerInfo[playerid][pBanka]);
INI_WriteInt(File,"MozeDaGasiTelefon",PlayerInfo[playerid][pMozeDaGasiTelefon]);
INI_WriteInt(File,"MozeDaStaviNeonke",PlayerInfo[playerid][pMozeDaStaviNeonke]);
INI_WriteInt(File,"MozeDaPaliRadio",PlayerInfo[playerid][pMozeDaPaliRadio]);
INI_WriteInt(File,"Ugovor",PlayerInfo[playerid][pUgovor]);
INI_WriteInt(File,"TutDone",PlayerInfo[playerid][pTutDone]);  // pMozeDaPaliRadio
//INI_Int("TutDone",PlayerInfo[playerid][pTutDone]);
INI_WriteInt(File,"ImaVisu",PlayerInfo[playerid][pImaVisu]);
INI_WriteInt(File,"Zavezan",PlayerInfo[playerid][pZavezan]);
INI_WriteInt(File,"Broj",PlayerInfo[playerid][pSim]);
INI_WriteInt(File,"Exploziv",PlayerInfo[playerid][pExploziv]);
INI_WriteInt(File,"Detonator",PlayerInfo[playerid][pDetonator]);
INI_WriteInt(File,"Bomba",PlayerInfo[playerid][pBomba]);
INI_WriteInt(File,"Materijali",PlayerInfo[playerid][pMaterijali]);
INI_WriteInt(File,"Droga",PlayerInfo[playerid][pDroga]);
INI_WriteInt(File,"Koka",PlayerInfo[playerid][pKoka]);
INI_WriteInt(File,"Droga",PlayerInfo[playerid][pDroga]);
INI_WriteInt(File,"pDRacun",PlayerInfo[playerid][pKredit]);
INI_WriteInt(File,"pSFirmaKljuc", PlayerInfo[playerid][pSFirmaKljuc]);
INI_WriteInt(File,"pDRacun",PlayerInfo[playerid][pRata]);
INI_WriteInt(File,"Upozorenja",PlayerInfo[playerid][pUpozorenja]);
INI_WriteInt(File,"pDozvolaVoznja", PlayerInfo[playerid][pDozvolaVoznja]);
INI_WriteInt(File,"KreditMobilnog",PlayerInfo[playerid][pKreditMobilnog]);
INI_WriteInt(File,"Banovan",PlayerInfo[playerid][pBanovan]);
INI_Close(File);
SacuvajVozilo(playerid);
SacuvajMotor(playerid);
SacuvajLetelicu(playerid);
SacuvajBiciklu(playerid);
SacuvajPlovilo(playerid);
    return 1;
}


Load user data...

public LoadUser_data(playerid,name[],value[])
{
INI_String("Lozinka", PlayerInfo[playerid][pLozinka], 100);
INI_String("Email", PlayerInfo[playerid][pEmail], 100);
INI_Int("Novcanik",PlayerInfo[playerid][pNovcanik]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("GameSage",PlayerInfo[playerid][pGS]);
INI_Int("Ubistva",PlayerInfo[playerid][pUbistva]);
INI_Int("Smrti",PlayerInfo[playerid][pSmrti]);
INI_Int("OnlineSati",PlayerInfo[playerid][pOnlineSati]);
INI_Int("Level",PlayerInfo[playerid][pLevel]);
INI_Int("Pol",PlayerInfo[playerid][pPol]);
INI_Int("Poreklo",PlayerInfo[playerid][pPoreklo]);
INI_Int("Registrovan",PlayerInfo[playerid][pRegistrovan]);
INI_Int("Telefon",PlayerInfo[playerid][pTelefon]);
INI_Int("BrojTelefona",PlayerInfo[playerid][pBrojTelefona]);
INI_Int("GPS",PlayerInfo[playerid][pGPS]);
//INI_Int("Mute",PlayerInfo[playerid][pMute]);
    INI_Int("pMute",PlayerInfo[playerid][pMute]);
    INI_Int("pMutiranVremena",PlayerInfo[playerid][pMutiranVremena]);
INI_Int("DzeparosVreme",PlayerInfo[playerid][pDzeparosVreme]);
INI_Int("Posao",PlayerInfo[playerid][pPosao]);
INI_Int("Skin",PlayerInfo[playerid][pSkin]);
INI_Int("OfflineBan",PlayerInfo[playerid][pOfflineBan]);
INI_Int("Lider",PlayerInfo[playerid][pLider]);
INI_Int("Clan",PlayerInfo[playerid][pClan]);
INI_Int("Rank",PlayerInfo[playerid][pRank]);
INI_Int("Spawn",PlayerInfo[playerid][pSpawn]);
INI_Int("Oruzje1",PlayerInfo[playerid][pOruzje1]);
INI_Int("Oruzje2",PlayerInfo[playerid][pOruzje2]);
INI_Int("Oruzje3",PlayerInfo[playerid][pOruzje3]);
INI_Int("Oruzje4",PlayerInfo[playerid][pOruzje4]);
INI_Int("Municija1",PlayerInfo[playerid][pMunicija1]);
INI_Int("Municija2",PlayerInfo[playerid][pMunicija2]);
INI_Int("Municija3",PlayerInfo[playerid][pMunicija3]);
INI_Int("Municija4",PlayerInfo[playerid][pMunicija4]);
INI_Int("Imenik",PlayerInfo[playerid][pImenik]);
INI_Int("Rent",PlayerInfo[playerid][pRent]);
INI_Int("PosedovanjeKuce",PlayerInfo[playerid][pPosedovanjeKuce]);
INI_Int("pKucaKljuc",PlayerInfo[playerid][pKucaKljuc]);
INI_Int("PosedovanjeStana",PlayerInfo[playerid][pPosedovanjeStana]);
INI_Int("PosedovanjeVikendice",PlayerInfo[playerid][pPosedovanjeVikendice]);
INI_Int("PosedovanjeFirme",PlayerInfo[playerid][pPosedovanjeFirme]);
INI_Int("Reket",PlayerInfo[playerid][pReket]);
INI_Int("MestoUOrg",PlayerInfo[playerid][pMestoUOrg]);
INI_Int("Respekti",PlayerInfo[playerid][pRespekti]);
INI_Int("PayDayPoeni",PlayerInfo[playerid][pPayDayPoeni]);
INI_Int("Vozilo",PlayerInfo[playerid][pVozilo]);
INI_Int("Motor",PlayerInfo[playerid][pMotor]);
INI_Int("Letelica",PlayerInfo[playerid][pLetelica]);
INI_Int("Bicikla",PlayerInfo[playerid][pBicikla]);
INI_Int("Plovilo",PlayerInfo[playerid][pPlovilo]);
INI_Int("VIP",PlayerInfo[playerid][pVIP]);
INI_Int("VIPBodovi",PlayerInfo[playerid][pVIPBodovi]);
INI_Int("OrgUgovor",PlayerInfo[playerid][pOrgUgovor]);
INI_Int("OrgKazna",PlayerInfo[playerid][pOrgKazna]);
INI_Int("PosaoUgovor",PlayerInfo[playerid][pPosaoUgovor]);
INI_Int("UgasenTelefon",PlayerInfo[playerid][pUgasenTelefon]);
INI_Int("Banka",PlayerInfo[playerid][pBanka]);
INI_Int("MozeDaGasiTelefon",PlayerInfo[playerid][pMozeDaGasiTelefon]);
INI_Int("MozeDaStaviNeonke",PlayerInfo[playerid][pMozeDaStaviNeonke]);
INI_Int("MozeDaPaliRadio",PlayerInfo[playerid][pMozeDaPaliRadio]);
INI_Int("Ugovor",PlayerInfo[playerid][pUgovor]);
//INI_Int("MozeDaPaliRadio",PlayerInfo[playerid][pMozeDaPaliRadio]); // pMozeDaPaliRadio // format(var, 32, "TutDone=[pTutDone]
INI_Int("TutDone",PlayerInfo[playerid][pTutDone]);
INI_Int("Broj",PlayerInfo[playerid][pSim]);
INI_Int("Zarada",PlayerInfo[playerid][pZarada]);
INI_Int("ImaVisu",PlayerInfo[playerid][pImaVisu]);
INI_Int("Zavezan",PlayerInfo[playerid][pZavezan]);
INI_Int("Exploziv",PlayerInfo[playerid][pExploziv]);
INI_Int("Detonator",PlayerInfo[playerid][pDetonator]);
INI_Int("Bomba",PlayerInfo[playerid][pBomba]);
INI_Int("Materijali",PlayerInfo[playerid][pMaterijali]);
INI_Int("Droga",PlayerInfo[playerid][pDroga]);
INI_Int("pSFirmaKljuc",PlayerInfo[playerid][pSFirmaKljuc]);
INI_Int("pDRacun",PlayerInfo[playerid][pKredit]);
    INI_Int("pDRacun",PlayerInfo[playerid][pRata]);
INI_Int("Koka",PlayerInfo[playerid][pKoka]);
INI_Int("Seme",PlayerInfo[playerid][pSeme]);
INI_Int("Upozorenja",PlayerInfo[playerid][pUpozorenja]);
INI_Int("pDozvolaVoznja",PlayerInfo[playerid][pDozvolaVoznja]);
INI_Int("KreditMobilnog",PlayerInfo[playerid][pKreditMobilnog]);
INI_Int("Banovan",PlayerInfo[playerid][pBanovan]);
return 1;
}

#define IGRAC_FILE         "Korisnici/%s.ini"

stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),IGRAC_FILE,playername);
return string;
}

public PredLogin2(playerid)
{
    /*TextDrawHideForPlayer(playerid, Textdraw0);
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    TextDrawHideForPlayer(playerid, Textdraw9);
    TextDrawHideForPlayer(playerid, Textdraw10);
    TextDrawHideForPlayer(playerid, Textdraw11);
    TextDrawHideForPlayer(playerid, Textdraw12);
    TextDrawHideForPlayer(playerid, Textdraw13); */
    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
new ptext[10],string[250];
if(PlayerInfo[playerid][pPoreklo] == 1) { ptext = "SRB"; }
else if(PlayerInfo[playerid][pPoreklo] == 2) { ptext = "BIH"; }
else if(PlayerInfo[playerid][pPoreklo] == 3) { ptext = "HRV"; }
format(string,sizeof(string),"{FFFFFF}___________________________________\n\nDobro dosao na {00BFFE}Second Life{FFFFFF} RolePlay\nKorisnik {FF0000}%s {FFFFFF}je pronadjen.\nPoreklo: {F3FF02}%s\n\n{FFFFFF}Unesite lozinku korisnika:\n___________________________________", ImeIgraca(playerid),ptext);
SPD(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{00BFFE}Se{FFFFFF}cond {F3FF02}Life",string,"Ulaz","Izlaz");
return 1;
}

Ovo je spremanje iz EGRP od 0 znaci sve normala radi na normalnom modu jedino ako si ti nesto dodavao u spremanje/ucitavanje
Mislim dakle Boze
Na Zari sve i svasta

Da to je,ali nisam ja nista dodavao sto nebi smeo,jednostavno nekad nece da spremi akount...