Y_INI Saving Issue
#1

Alright, so I am using Y_ini for my saving of player info, and lately for some reason, passwords are not being saved correctly. Here is what I have:

pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths,
    pSkin,
    pWeaponPistol,
    pWeaponPistolAmmo,
    pWeaponShotgun,
    pWeaponShotgunAmmo,
    pWeaponSMG,
    pWeaponSMGAmmo,
    pWeaponAssault,
    pWeaponAssaultAmmo,
    pWeaponThrown,
    pWeaponThrownAmmo,
    pWeaponCombat,
    pWeaponSpray,
    pWeaponSprayAmmo,
    pCharacterSetUp,
    pOrigin,
    pGender,
    pAge,
    Authenticated,
    pTutorial,
    pArmy,
    pArmyRank,
    pArmyLead,
    InTutorial
}
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
forward TutorialTimer1(playerid);
forward TutorialTimer2(playerid);
forward TutorialTimer3(playerid);
forward TutorialTimer4(playerid, inputtext[]);
forward PaydayTimer(playerid);
forward SpawnTimer(playerid);
forward SavePlayerDat(playerid, inputtext[]);
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Money",PlayerInfo[playerid][pCash]);
    INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    INI_Int("Administrator",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}
pawn Код:
stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}
pawn Код:
stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
    }
    SetPlayerColor(playerid, 0xFFFFFFFF);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_WriteInt(File,"Skin",GetPlayerSkin(playerid));
    INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
    INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
    INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
    INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
    INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
    INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
    INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
    INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
    INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
    INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
    INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
    INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
    INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
    INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
    INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
    INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
    INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
    INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
    INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
    INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
    INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
    INI_Close(File);
    return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",3500);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_WriteInt(File,"Skin",1);
                INI_WriteInt(File,"Pistol",0);
                INI_WriteInt(File,"PistolAmmo",0);
                INI_WriteInt(File,"Shotgun",0);
                INI_WriteInt(File,"ShotgunAmmo",0);
                INI_WriteInt(File,"SMG",0);
                INI_WriteInt(File,"SMGAmmo",0);
                INI_WriteInt(File,"Assault",0);
                INI_WriteInt(File,"AssaultAmmo",0);
                INI_WriteInt(File,"Thrown",0);
                INI_WriteInt(File,"ThrownAmmo",0);
                INI_WriteInt(File,"Combat",0);
                INI_WriteInt(File,"Spray",0);
                INI_WriteInt(File,"SprayAmmo",0);
                INI_WriteInt(File,"pCharacterSetUp",0);
                INI_WriteInt(File,"Origin",0);
                INI_WriteInt(File,"Gender",0);
                INI_WriteInt(File,"Tutorial",0);
                INI_WriteInt(File,"Age",0);
                INI_WriteInt(File,"Army",0);
                INI_WriteInt(File,"ArmyRank",0);
                INI_WriteInt(File,"ArmyLead",0);
                INI_Close(File);
                SendClientMessage(playerid, 0x8083FFFF, "You will now undergo a character set up");
                ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_LIST, "Select your Origin", "American\nEuropean\nAsian\nGerman\nTaliban\nOther", "Select", "Quit");
            }
        }

        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    PlayerInfo[playerid][Authenticated] = 0;
                    if(PlayerInfo[playerid][pCharacterSetUp] == 0)
                    {
                        ShowPlayerDialog(playerid, DIALOG_ORIGIN, DIALOG_STYLE_LIST, "Select your Origin", "American\nEuropean\nAsian\nGerman\nTaliban\nOther", "Select", "Quit");
                    }
                    SetPlayerPos(playerid, 1958.33, 1343.12, 15.36);
                    SpawnPlayer(playerid);
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
        case DIALOG_ORIGIN:
        {
            if( !response ) return Kick ( playerid );
            if( response )
            {
                switch(listitem)
                {
                    case 0:
                    {
                        new INI:File = INI_Open(UserPath(playerid));
                        INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                        INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                        INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                        INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                        INI_WriteInt(File,"Skin",1);
                        INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                        INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                        INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                        INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                        INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                        INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                        INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                        INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                        INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                        INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                        INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                        INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                        INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                        INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                        INI_WriteInt(File,"Origin",0);
                        INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
                        INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                        INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                        INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                        INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                        INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                        INI_Close(File);
                        SendClientMessage(playerid, 0x8083FFFF, "You have selected: American.");
                        ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Select your Gender", "Male\nFemale\nHe-She", "Select", "Quit");
                    }
                    case 1:
                    {
                        new INI:File = INI_Open(UserPath(playerid));
                        INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                        INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                        INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                        INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                        INI_WriteInt(File,"Skin",1);
                        INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                        INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                        INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                        INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                        INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                        INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                        INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                        INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                        INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                        INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                        INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                        INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                        INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                        INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                        INI_WriteInt(File,"Origin",1);
                        INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
                        INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                        INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                        INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                        INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                        INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                        INI_Close(File);
                        SendClientMessage(playerid, 0x8083FFFF, "You have selected: European.");
                        ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Select your Gender", "Male\nFemale\nHe-She", "Select", "Quit");
                    }
                    case 2:
                    {
                        new INI:File = INI_Open(UserPath(playerid));
                        INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                        INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                        INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                        INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                        INI_WriteInt(File,"Skin",1);
                        INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                        INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                        INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                        INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                        INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                        INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                        INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                        INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                        INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                        INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                        INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                        INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                        INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                        INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                        INI_WriteInt(File,"Origin",2);
                        INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
                        INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                        INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                        INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                        INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                        INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                        INI_Close(File);
                        SendClientMessage(playerid, 0x8083FFFF, "You have selected: Asian.");
                        ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Select your Gender", "Male\nFemale\nHe-She", "Select", "Quit");
                    }
                    case 3:
                    {
                        new INI:File = INI_Open(UserPath(playerid));
                        INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                        INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                        INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                        INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                        INI_WriteInt(File,"Skin",1);
                        INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                        INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                        INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                        INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                        INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                        INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                        INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                        INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                        INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                        INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                        INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                        INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                        INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                        INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                        INI_WriteInt(File,"Origin",3);
                        INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
                        INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                        INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                        INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                        INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                        INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                        INI_Close(File);
                        SendClientMessage(playerid, 0x8083FFFF, "You have selected: German.");
                        ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Select your Gender", "Male\nFemale\nHe-She", "Select", "Quit");
                    }
                    case 4:
                    {
                        new INI:File = INI_Open(UserPath(playerid));
                        INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                        INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                        INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                        INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                        INI_WriteInt(File,"Skin",1);
                        INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                        INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                        INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                        INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                        INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                        INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                        INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                        INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                        INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                        INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                        INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                        INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                        INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                        INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                        INI_WriteInt(File,"Origin",4);
                        INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
                        INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                        INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                        INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                        INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                        INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                        INI_Close(File);
                        SendClientMessage(playerid, 0x8083FFFF, "You have selected: Taliban.");
                        ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Select your Gender", "Male\nFemale\nHe-She", "Select", "Quit");
                    }
                    case 5:
                    {
                        new INI:File = INI_Open(UserPath(playerid));
                        INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                        INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                        INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                        INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                        INI_WriteInt(File,"Skin",1);
                        INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                        INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                        INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                        INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                        INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                        INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                        INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                        INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                        INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                        INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                        INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                        INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                        INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                        INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                        INI_WriteInt(File,"Origin",5);
                        INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
                        INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                        INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                        INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                        INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                        INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                        INI_Close(File);
                        SendClientMessage(playerid, 0x8083FFFF, "You have selected: Other.");
                        ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Select your Gender", "Male\nFemale\nHe-She", "Select", "Quit");
                    }
                }
            }
        }
        case DIALOG_GENDER:
        {
            switch(listitem)
            {
                case 0:
                {
                    new INI:File = INI_Open(UserPath(playerid));
                    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                    INI_WriteInt(File,"Skin",1);
                    INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                    INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                    INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                    INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                    INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                    INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                    INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                    INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                    INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                    INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                    INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                    INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                    INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                    INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                    INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
                    INI_WriteInt(File,"Gender",0);
                    INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                    INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                    INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                    INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                    INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                    INI_Close(File);
                    SendClientMessage(playerid, 0x8083FFFF, "You have selected: Male.");
                    ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age","Please type in your age", "Select", "Quit");
                }
                case 1:
                {
                    new INI:File = INI_Open(UserPath(playerid));
                    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                    INI_WriteInt(File,"Skin",1);
                    INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                    INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                    INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                    INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                    INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                    INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                    INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                    INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                    INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                    INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                    INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                    INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                    INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                    INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                    INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
                    INI_WriteInt(File,"Gender",1);
                    INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                    INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                    INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                    INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                    INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                    INI_Close(File);
                    SendClientMessage(playerid, 0x8083FFFF, "You have selected: Female.");
                    ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age","Please type in your age", "Select", "Quit");
                }
                case 2:
                {
                    new INI:File = INI_Open(UserPath(playerid));
                    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                    INI_WriteInt(File,"Skin",1);
                    INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                    INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                    INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                    INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                    INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                    INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                    INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                    INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                    INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                    INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                    INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                    INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                    INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                    INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
                    INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
                    INI_WriteInt(File,"Gender",2);
                    INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                    INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
                    INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                    INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                    INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                    INI_Close(File);
                    SendClientMessage(playerid, 0x8083FFFF, "You have selected: He-She.");
                    ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age","Please type in your age", "Select", "Quit");
                }
            }
        }
        case DIALOG_AGE:
        {
            if(strlen(inputtext) >= 1)
            {
                if(IsNumeric(inputtext))
                {
                    new INI:File = INI_Open(UserPath(playerid));
                    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
                    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
                    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
                    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
                    INI_WriteInt(File,"Skin",1);
                    INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
                    INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
                    INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
                    INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
                    INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
                    INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
                    INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
                    INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
                    INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
                    INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
                    INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
                    INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
                    INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
                    INI_WriteInt(File,"pCharacterSetUp",1);
                    INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
                    INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
                    INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTutorial]);
                    INI_WriteInt(File,"Age",strlen(inputtext));
                    INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
                    INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
                    INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
                    INI_Close(File);
                    new string[128];
                    format(string, sizeof(string), "You have set your age to: %s", inputtext);
                    SendClientMessage(playerid, 0x8083FFFF, string);
                    PlayerInfo[playerid][pCharacterSetUp] = 1;
                    PlayerInfo[playerid][Authenticated] = 1;
                    SendClientMessage(playerid, 0x8083FFFF, "You have completed the character set up, you will now to required to go through the tutorial.");
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    PlayerInfo[playerid][pCharacterSetUp] = 1;
                    PlayerInfo[playerid][Authenticated] = 1;
                    SendClientMessage(playerid, 0x8083FFFF, "You have completed the character set up, you will now to required to go through the tutorial.");
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    if(PlayerInfo[playerid][pTutorial] == 0 || PlayerInfo[playerid][InTutorial] == 0)
                    {
                        TogglePlayerControllable(playerid, 0);
                        PlayerInfo[playerid][InTutorial] = 1;
                        SetPlayerPos(playerid, -91.7157,1111.8914,24.0230);
                        SetPlayerCameraPos(playerid, -91.7157,1111.8914,24.0230);
                        SetPlayerFacingAngle(playerid, 0);
                        SendClientMessage(playerid, 0xFF0000FF, "|__________________________________|Origin Refuges|__________________________________|");
                        SendClientMessage(playerid, 0xFF0000FF, "Each origin, (American, European, Asian, German, Taliban, Other) has their own");
                        SendClientMessage(playerid, 0xFF0000FF, "Refuge, or place for their civilians. Their armies can restock here, help people, etc.");
                        SendClientMessage(playerid, 0xFF0000FF, "They cannot attack you for war purposes. You are almost always safe in your origin's refuges being");
                        SendClientMessage(playerid, 0xFF0000FF, "Administrators are the only people that can grant attacks on other origin's refuges.");
                        SendClientMessage(playerid, 0xFF0000FF, "Around the refuges, you can usually buy and find goods for surival via /search!");
                        SendClientMessage(playerid, 0xFFFF9DFF, "----------Let this message sink in, you will have to wait 30 seconds here.----------");
                        SetTimerEx("TutorialTimer1", 3000, false, "i", playerid);
                    }
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, ""COL_WHITE"Age",""COL_RED"You did not type an age!.\n"COL_WHITE"Please type in your age.","Select","Quit");
                }
            }
        }
    }
    return 1;
}

public TutorialTimer1(playerid)
{
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SendClientMessage(playerid, -1,"");
        SetPlayerPos(playerid, 99.0737,1921.0780,18.2214);
        SetPlayerVirtualWorld(playerid, 1);
        SetPlayerCameraPos(playerid, 99.0737,1921.0780,18.2214);
        SendClientMessage(playerid, 0xFF0000FF, "|___________________________________________|Armies|___________________________________________|");
        SendClientMessage(playerid, 0xFF0000FF, "Every refuge belongs to an army, it is basically a territory in which their people");
        SendClientMessage(playerid, 0xFF0000FF, "To reside in. Armies have quite a few weapons, so do not tick them off. You should note");
        SendClientMessage(playerid, 0xFF0000FF, "That you are not limited to your origin's army, but to any army, although armies");
        SendClientMessage(playerid, 0xFF0000FF, "May ICly discriminate you due to your race, remember, it is all in the roleplay!");
        SendClientMessage(playerid, 0xFF0000FF, "Armies can take over territories all over, conduct raids, etcetera. Remember, joining");
        SendClientMessage(playerid, 0xFF0000FF, "Armies or factions can be really fun, yet being killed  by them may not be, be careful!");
        SendClientMessage(playerid, 0xFFFF9DFF, "----------Let this message sink in, you will have to wait 30 seconds here.----------");
        SetTimerEx("TutorialTimer2", 3000, false, "i", playerid);
        return 1;
}

public TutorialTimer2(playerid)
{
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, 0xFF0000FF, "|___________________________________________|Goods|___________________________________________|");
    SendClientMessage(playerid, 0xFF0000FF, "Here, you can find goods such as weaponry, food, 'Substances', medicine, medical kits, etc.");
    SendClientMessage(playerid, 0xFF0000FF, "Of course, everything comes for a cost, whether it be cash, or trade. Being the times are harsh");
    SendClientMessage(playerid, 0xFF0000FF, "It may take quite a bit to get that 'hunting' rifle you wanted, or even medicine for that matter.");
    SendClientMessage(playerid, 0xFF0000FF, "Some people will try to rob you of your money by ripping you off for their own benefit, so you");
    SendClientMessage(playerid, 0xFF0000FF, "Should learn the values of things before you go trying to buy something from here. You can also");
    SendClientMessage(playerid, 0xFF0000FF, "Find some goods around refuges, and if you aren't killed, supplies from military bases! (Good Luck!)");
    SendClientMessage(playerid, 0xFFFF9DFF, "----------Let this message sink in, you will have to wait 30 seconds here.----------");
    SetTimerEx("TutorialTimer3", 3000, false, "i", playerid);
    return 1;
}

public TutorialTimer3(playerid)
{
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, 0xFF0000FF, "|___________________________________|The Land... And The Sea|___________________________________|");
    SendClientMessage(playerid, 0xFF0000FF, "You may notice if you go out for a swim, that there are not only bases, land, and battlezones on land");
    SendClientMessage(playerid, 0xFF0000FF, "But also on the sea! Legend has it that one of the deserted islands, is home to a library of knowledge");
    SendClientMessage(playerid, 0xFF0000FF, "That will tell you everything you need to know... But, that is a legend, and many will let it stay that");
    SendClientMessage(playerid, 0xFF0000FF, "Way. We created the islands, to create a since of war aswell, give some Navy Action, not just some basic");
    SendClientMessage(playerid, 0xFF0000FF, "Land battles, it is unrealistic, we thrive to be realistic and fun for your enjoyment, so we do everything");
    SendClientMessage(playerid, 0xFF0000FF, "that we can to make it more realistic. Also, you are not allowed to any big cities, you will be punished for such!");
    SendClientMessage(playerid, 0xFFFF9DFF, "----------Let this message sink in, you will have to wait 30 seconds here.----------");
    SetTimerEx("TutorialTimer4", 3000, false, "i", playerid);
    return 1;
}

public TutorialTimer4(playerid, inputtext[])
{
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, -1,"");
    SendClientMessage(playerid, 0xFF0000FF, "|___________________________________|Summing it up|___________________________________|");
    SendClientMessage(playerid, 0xFF0000FF, "So... we here at Call of Vengeance Roleplay, hope you have the best of your gaming capabitily");
    SendClientMessage(playerid, 0xFF0000FF, "If you are needing any assistance feel free to ask in the newbie chat (/n(ewbie), or /PM an");
    SendClientMessage(playerid, 0xFF0000FF, "ON DUTY administrator. Speaking of administrators, we are currently not looking for any, but");
    SendClientMessage(playerid, 0xFF0000FF, "Keep patient, there will always be a time, so be sure you follow the server rules which can be");
    SendClientMessage(playerid, 0xFF0000FF, "Found by using the help command (/help).");
    SendClientMessage(playerid, 0xFF0000FF, "We hope you enjoy your stay here at Call of Vengeance Roleplay! -Nathan Mader Owner & Scripter");
    SendClientMessage(playerid, 0xFFFF9DFF, "----------Let this message sink in, you will have to wait 30 seconds here.----------");
    SetTimerEx("SpawnTimer", 3000, false, "i", playerid);
    new INI:File = INI_Open(UserPath(playerid));
    INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_WriteInt(File,"Skin",1);
    INI_WriteInt(File,"Pistol",PlayerInfo[playerid][pWeaponPistol]);
    INI_WriteInt(File,"PistolAmmo",PlayerInfo[playerid][pWeaponPistolAmmo]);
    INI_WriteInt(File,"Shotgun",PlayerInfo[playerid][pWeaponShotgun]);
    INI_WriteInt(File,"ShotgunAmmo",PlayerInfo[playerid][pWeaponShotgunAmmo]);
    INI_WriteInt(File,"SMG",PlayerInfo[playerid][pWeaponSMG]);
    INI_WriteInt(File,"SMGAmmo",PlayerInfo[playerid][pWeaponSMGAmmo]);
    INI_WriteInt(File,"Assault",PlayerInfo[playerid][pWeaponAssault]);
    INI_WriteInt(File,"AssaultAmmo",PlayerInfo[playerid][pWeaponAssaultAmmo]);
    INI_WriteInt(File,"Thrown",PlayerInfo[playerid][pWeaponThrown]);
    INI_WriteInt(File,"ThrownAmmo",PlayerInfo[playerid][pWeaponThrownAmmo]);
    INI_WriteInt(File,"Combat",PlayerInfo[playerid][pWeaponCombat]);
    INI_WriteInt(File,"Spray",PlayerInfo[playerid][pWeaponSpray]);
    INI_WriteInt(File,"SprayAmmo",PlayerInfo[playerid][pWeaponSprayAmmo]);
    INI_WriteInt(File,"pCharacterSetUp",PlayerInfo[playerid][pCharacterSetUp]);
    INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
    INI_WriteInt(File,"Gender",PlayerInfo[playerid][pGender]);
    INI_WriteInt(File,"Tutorial",1);
    INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
    INI_WriteInt(File,"Army",PlayerInfo[playerid][pArmy]);
    INI_WriteInt(File,"ArmyRank",PlayerInfo[playerid][pArmyRank]);
    INI_WriteInt(File,"ArmyLead",PlayerInfo[playerid][pArmyLead]);
    INI_Close(File);
    TogglePlayerControllable(playerid, 1);
    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
    PlayerInfo[playerid][InTutorial] = 0;
    return 1;
}
I have tried saving the password in multiple forms, all leading to a failure. I need to get the password done before I can begin with scripting my armies for my server.
Reply
#2

UPDATE: What is happening now is the passwords all say they are incorrect.
Reply
#3

Код:
INI_Int("Password",PlayerInfo[playerid][pPass]);
Shouldn't this be a string not an integer?
Reply
#4

I had used this guide to try to find any errors, and they have it in like I do in here: http://pastebin.com/r4htbbcJ
Reply
#5

I am pretty sure you have to create the file first with DEFAULT functions.(Miss that one ******?)

Try:

Код:
new File:file = fopen(YOUR_FORMATED_FILE, io_write);
fclose(file);
BEFORE you open the file with y_ini (When they register)

EDIT:

Quote:
Originally Posted by iRage
Посмотреть сообщение
Код:
INI_Int("Password",PlayerInfo[playerid][pPass]);
Shouldn't this be a string not an integer?
No, he is using a password hasher, which returns a integra, meaning if he used a string he will then have to use the strval function.
Reply
#6

Quote:
Originally Posted by warcodes_
Посмотреть сообщение
I am pretty sure you have to create the file first with DEFAULT functions.(Miss that one ******?)

Try:

Код:
new File:file = fopen(YOUR_FORMATED_FILE, io_write);
fclose(file);
BEFORE you open the file with y_ini (When they register)

EDIT:

No, he is using a password hasher, which returns a integra, meaning if he used a string he will then have to use the strval function.
I don't understand why it isn't working as is though... Your way didn't work either...
Reply
#7

So, your file creates/saves properly, but does not load properly?

Please explain your issue in one sentence.
Reply
#8

Alright, here is what I get after I register:
pawn Код:
[Player Info]
Password = 245826374
Cash = 0
Admin = 0
Kills = 0
Deaths = 0
Skin = 0
Pistol = 0
PistolAmmo = 0
Shotgun = 0
ShotgunAmmo = 0
SMG = 0
SMGAmmo = 0
Assault = 0
AssaultAmmo = 0
Thrown = 0
ThrownAmmo = 0
Combat = 0
Spray = 0
SprayAmmo = 0
pCharacterSetUp = 1
Origin = 0
Gender = 0
Tutorial = 0
Age = 0
Army = 0
ArmyRank = 0
ArmyLead = 0
I think the registration system is not successfully unhashing it completely.
Reply
#9

EDIT:

Use strcmp.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)