#1

Fixed.
Reply
#2

pawn Code:
enum PlayerData
{
 pPass,
    pLevel,
    pMoney,
    pAdmin,
    pHelper,
    pMember,
    pLeader,
    pSex,
    pAge,
    pEmail,
    pSkin,
    pLanguage
};
new PInfo[MAX_PLAYERS][PlayerData];
Reply
#3

Fixed.
Reply
#4

upp!!
Reply
#5

Quote:
Originally Posted by Edw
View Post
upp!!
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
    // ===== Login and Register =====
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"pLevel",PlayerInfo[playerid][pLevel]);
    INI_WriteInt(File,"pMoney",GetPlayerMoney(playerid));
    INI_WriteInt(File,"pAdmin",PlayerInfo[playerid][pAdmin]);
     INI_WriteInt(File,"pHelper",PlayerInfo[playerid][pHelper]);
    INI_WriteInt(File,"pMember",PlayerInfo[playerid][pMember]);
     INI_WriteInt(File,"pLeader",PlayerInfo[playerid][pLeader]);
    INI_WriteInt(File,"pSex",PlayerInfo[playerid][pSex]);
     INI_WriteInt(File,"pAge",PlayerInfo[playerid][pAge]);
    INI_WriteInt(File,"pEmail",PlayerInfo[playerid][pEmail]);
     INI_WriteInt(File,"pSkin",PlayerInfo[playerid][pSkin]);
     INI_WriteInt(File,"pLanguage",PlayerInfo[playerid][pLanguage]);
    INI_Close(File);


//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                 new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"pPass",udb_hash(inputtext));
                INI_WriteInt(File,"pLevel",0);
                INI_WriteInt(File,"pMoney",0);
                INI_WriteInt(File,"pAdmin",0);
                INI_WriteInt(File,"pHelper",0);
                INI_WriteInt(File,"pMember",0);
                INI_WriteInt(File,"pLeader",0);
                INI_WriteInt(File,"pSex",0);
                INI_WriteInt(File,"pAge",0);
                INI_WriteInt(File,"pEmail",0);
                INI_WriteInt(File,"pSkin",0);
                INI_WriteInt(File,"pLanguage",0);

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("pPass",PlayerInfo[playerid][pPass]);
    INI_Int("pLevel",PlayerInfo[playerid][pLevel]);
    INI_Int("pMoney",PlayerInfo[playerid][pMoney]);
    INI_Int("pAdmin",PlayerInfo[playerid][pAdmin]);
    INI_Int("pHelper",PlayerInfo[playerid][pHelper]);
    INI_Int("pMember",PlayerInfo[playerid][pMember]);
    INI_Int("pLeader",PlayerInfo[playerid][pLeader]);
    INI_Int("pSex",PlayerInfo[playerid][pSex]);
    INI_Int("pAge",PlayerInfo[playerid][pAge]);
    INI_Int("pEmail",PlayerInfo[playerid][pEmail]);
    INI_Int("pSkin",PlayerInfo[playerid][pSkin]);
    INI_Int("pLanguage",PlayerInfo[playerid][pLanguage]);
    return 1;
}
Reply
#6

The order of the code in there doesn't matter.
Reply
#7

Quote:
Originally Posted by TakeiT
View Post
The order of the code in there doesn't matter.
But he want that so...
Reply
#8

Fixed.
Reply
#9

Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)