Y_Ini Save GetPVarInt And Load SetPVarInt
#1

Heey all,

I am using Y_Ini for my account system.
And i want to know how you can Save GetPVarInt And Load SetPVarInt?
Please help me. I need this.

Thanks Admigo
Reply
#2

Why dont you add a integer variable in your enumeration of the array defined for your PlayerInfo? You will be able to save it for every player in their respective ini file. Make it the same way you have made Player's kills/deaths/etc.
Reply
#3

Its saving but its not loading.


pawn Код:
//load user
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Logged",PlayerInfo[playerid][pLogged]);
    INI_Int("Class",PlayerInfo[playerid][pClass]);
    INI_Int("Money",PlayerInfo[playerid][pCash]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}

//dialog login
new string[256];
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
PlayerInfo[playerid][pClass]=PlayerInfo[playerid][pClass];
PlayerInfo[playerid][pLogged]=1;

//onplayerreqclass
if(PlayerInfo[playerid][pClass]==1)
    {
        Class_Goto(playerid, 0);
    }
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)