SA-MP Forums Archive
Sts - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Sts (/showthread.php?tid=513826)



Sts - Ananisiki - 18.05.2014

I have stats that saved in another file, so i decide to move admin level + other stuff + stats in one file, but now the admin level just load (just like before) not anything else....


pawn Код:
//OnPlayerDisconnect
    new pID, stats[256];
    format(stats, sizeof stats, "DM/Accounts/%s.ini", PlayerName(pID));
    if(dini_Exists(stats))
    {
        dini_IntSet(stats, "Score", GetPlayerScore(playerid));
        dini_IntSet(stats, "Kills", pInfo[playerid][Kills]);
        dini_IntSet(stats, "Deaths", pInfo[playerid][Deaths]);
        dini_IntSet(stats, "Money", GetPlayerMoney(playerid));
        dini_IntSet(stats, "Rapes", pInfo[playerid][Rapes]);
        dini_IntSet(stats, "DrugsTaken", pInfo[playerid][DrugsTaken]);
        dini_IntSet(stats, "DaysPlayed", pInfo[playerid][DaysPlayed]);
        dini_IntSet(stats, "BonusKills", pInfo[playerid][BonusKills]);
/*      dini_IntSet(stats, "FavSkin", pInfo[playerid][FavSkin]);
        dini_IntSet(stats, "FavSkinEnable", pInfo[playerid][FavSkinEnable]);
        dini_IntSet(stats, "GameYear", pInfo[playerid][GameYear]);
        dini_IntSet(stats, "ChallengeKills", pInfo[playerid][ChallengeKills]);
        dini_IntSet(stats, "NoPM", pInfo[playerid][NoPM]);
        dini_IntSet(stats, "Belt", pInfo[playerid][Belt]);*/

    }

//OnDialogResponse (when register)

            dini_Create(file);
            dini_Set(file, "Password", MD5_Hash(inputtext));
            dini_IntSet(file, "Level", 0);
            dini_IntSet(file, "Score", 0);
            dini_IntSet(file, "Kills", 0);
            dini_IntSet(file, "Deaths", 0);
            dini_IntSet(file, "Money", 0);
            dini_IntSet(file, "Rapes", 0);
            dini_IntSet(file, "DrugsTaken", 0);
            dini_IntSet(file, "DaysPlayed", 0);
            dini_IntSet(file, "BonusKills", 0);
            dini_IntSet(file, "FavSkin", 0);
            dini_IntSet(file, "FavSkinEnable", 0);
            dini_IntSet(file, "GameYear", 0);
            dini_IntSet(file, "ChallengeKills", 0);
            dini_IntSet(file, "NoPM", 0);
            dini_IntSet(file, "Belt", 0);



Re: Sts - Ananisiki - 18.05.2014

Really need help i cant see what the problem is....


Re: Sts - RajatPawar - 18.05.2014

Could you please read this & this?

Then, coming to your problem, since you moved everything to one file, there are a lot of loose ends to be tied up - the code registering the player needs to be changed, the code saving after a disconnect needs to be changed, the code logging in a player needs to be changed and so on. Have you done that?


Re: Sts - Ananisiki - 18.05.2014

I did on register but im not sure on onplayerdisconnect and logging in