03.02.2011, 12:11
My problem is when I register, the password in user.txt comes 0. Why the hell is that? btw this is my code
pawn Код:
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[64];
new string[128];
new playersip[24];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
GetPlayerIp(playerid, playersip, sizeof(playersip));
format(string3, sizeof(string3), "LARP/Users/%s.ini", playername3);
dini_Create(string3);
new password2 = password;
PlayerInfo[playerid][pKey] = password2;
dini_IntSet(string3, "Password",password2);
dini_IntSet(string3, "Level",PlayerInfo[playerid][pLevel]);
dini_IntSet(string3, "Spawn",PlayerInfo[playerid][pSpawn]);
dini_IntSet(string3, "TesterLevel",PlayerInfo[playerid][pTester]);
dini_IntSet(string3, "HelperLevel",PlayerInfo[playerid][pHelper]);
dini_IntSet(string3, "AdminLevel",PlayerInfo[playerid][pAdmin]);
dini_IntSet(string3, "RegularRank",PlayerInfo[playerid][pRegularRank]);
dini_IntSet(string3, "UpgradePoints",PlayerInfo[playerid][gPupgrade]);
dini_IntSet(string3, "ConnectedTime",PlayerInfo[playerid][pConnectSeconds]);
dini_IntSet(string3, "Registered",PlayerInfo[playerid][pReg]);
dini_IntSet(string3, "Sex",PlayerInfo[playerid][pSex]);
dini_IntSet(string3, "Age",PlayerInfo[playerid][pAge]);
dini_IntSet(string3, "GPS",PlayerInfo[playerid][pGPS]);
dini_IntSet(string3, "Origin",PlayerInfo[playerid][pOrigin]);
dini_IntSet(string3, "CK",PlayerInfo[playerid][pCK]);
dini_IntSet(string3, "Muted",PlayerInfo[playerid][pMuted]);
dini_IntSet(string3, "Frozen",PlayerInfo[playerid][pFrozen]);
dini_IntSet(string3, "Blind",PlayerInfo[playerid][pBlind]);
dini_IntSet(string3, "Respect",PlayerInfo[playerid][pExp]);
dini_IntSet(string3, "Money",PlayerInfo[playerid][pCash]);
PlayerInfo[playerid][pCash] = ScriptMoney[playerid];
dini_IntSet(string3, "Bank",PlayerInfo[playerid][pAccount]);
dini_IntSet(string3, "Crimes",PlayerInfo[playerid][pCrimes]);
dini_Set(string3, "CrimeReason",PlayerInfo[playerid][pCrimeReason]);
dini_IntSet(string3, "Wanted",PlayerInfo[playerid][pWanted]);
dini_IntSet(string3, "WantedLevel",PlayerInfo[playerid][pWantedLevel]);
dini_IntSet(string3, "Kills",PlayerInfo[playerid][pKills]);
dini_IntSet(string3, "Deaths",PlayerInfo[playerid][pDeaths]);
dini_IntSet(string3, "Arrested",PlayerInfo[playerid][pArrested]);
dini_IntSet(string3, "WantedDeaths",PlayerInfo[playerid][pWantedDeaths]);
dini_IntSet(string3, "Phonebook",PlayerInfo[playerid][pPhoneBook]);
dini_IntSet(string3, "LottoNr",PlayerInfo[playerid][pLottoNr]);
dini_IntSet(string3, "Fishes",PlayerInfo[playerid][pFishes]);
dini_IntSet(string3, "BiggestFish",PlayerInfo[playerid][pBiggestFish]);
dini_IntSet(string3, "Job",PlayerInfo[playerid][pJob]);
dini_IntSet(string3, "Paycheck",PlayerInfo[playerid][pPayCheck]);
dini_IntSet(string3, "HeadValue",PlayerInfo[playerid][pHeadValue]);
dini_IntSet(string3, "Jailed",PlayerInfo[playerid][pJailed]);
dini_IntSet(string3, "JailTime",PlayerInfo[playerid][pJailTime]);
dini_IntSet(string3, "CanRobTime",PlayerInfo[playerid][pRobTime]);
dini_IntSet(string3, "Materials",PlayerInfo[playerid][pMats]);
dini_IntSet(string3, "Drugs",PlayerInfo[playerid][pDrugs]);
dini_IntSet(string3, "Leader",PlayerInfo[playerid][pLeader]);
dini_IntSet(string3, "Member",PlayerInfo[playerid][pMember]);
dini_IntSet(string3, "FMember",PlayerInfo[playerid][pFMember]);
dini_IntSet(string3, "Rank",PlayerInfo[playerid][pRank]);
dini_IntSet(string3, "Char",PlayerInfo[playerid][pChar]);
dini_IntSet(string3, "ContractTime",PlayerInfo[playerid][pContractTime]);
dini_IntSet(string3, "DetSkill",PlayerInfo[playerid][pDetSkill]);
dini_IntSet(string3, "SexSkill",PlayerInfo[playerid][pSexSkill]);
dini_IntSet(string3, "BoxSkill",PlayerInfo[playerid][pBoxSkill]);
dini_IntSet(string3, "LawSkill",PlayerInfo[playerid][pLawSkill]);
dini_IntSet(string3, "MechSkill",PlayerInfo[playerid][pMechSkill]);
dini_IntSet(string3, "JackSkill",PlayerInfo[playerid][pJackSkill]);
dini_IntSet(string3, "CarSkill",PlayerInfo[playerid][pCarSkill]);
dini_IntSet(string3, "NewsSkill",PlayerInfo[playerid][pNewsSkill]);
dini_IntSet(string3, "DrugsSkill",PlayerInfo[playerid][pDrugsSkill]);
dini_IntSet(string3, "CookSkill",PlayerInfo[playerid][pCookSkill]);
dini_IntSet(string3, "FishSkill",PlayerInfo[playerid][pFishSkill]);
dini_FloatSet(string3, "pHealth",PlayerInfo[playerid][pHealth]);
dini_FloatSet(string3, "pArmour",PlayerInfo[playerid][pArmour]);
dini_IntSet(string3, "Int",PlayerInfo[playerid][pInt]);
dini_IntSet(string3, "InteriorNr",PlayerInfo[playerid][pInteriorNr]);
dini_IntSet(string3, "Local",PlayerInfo[playerid][pLocal]);
dini_IntSet(string3, "Team",PlayerInfo[playerid][pTeam]);
dini_IntSet(string3, "Model",PlayerInfo[playerid][pModel]);
dini_IntSet(string3, "PhoneNr",PlayerInfo[playerid][pPnumber]);
dini_IntSet(string3, "Car",PlayerInfo[playerid][pPcarkey]);
dini_IntSet(string3, "Car2",PlayerInfo[playerid][pPcarkey2]);
dini_IntSet(string3, "House",PlayerInfo[playerid][pPhousekey]);
dini_IntSet(string3, "Bizz",PlayerInfo[playerid][pPbiskey]);
dini_FloatSet(string3, "Pos_x",PlayerInfo[playerid][pPos_x]);
dini_FloatSet(string3, "Pos_y",PlayerInfo[playerid][pPos_y]);
dini_FloatSet(string3, "Pos_z",PlayerInfo[playerid][pPos_z]);
dini_IntSet(string3, "Passport",PlayerInfo[playerid][pPassport]);
dini_IntSet(string3, "CarLic",PlayerInfo[playerid][pCarLic]);
dini_IntSet(string3, "FlyLic",PlayerInfo[playerid][pFlyLic]);
dini_IntSet(string3, "BoatLic",PlayerInfo[playerid][pBoatLic]);
dini_IntSet(string3, "FishLic",PlayerInfo[playerid][pFishLic]);
dini_IntSet(string3, "GunLic",PlayerInfo[playerid][pGunLic]);
dini_IntSet(string3, "CopLic",PlayerInfo[playerid][pCopLic]);
dini_IntSet(string3, "CarTime",PlayerInfo[playerid][pCarTime]);
dini_IntSet(string3, "PayDay",PlayerInfo[playerid][pPayDay]);
dini_IntSet(string3, "PayDayHad",PlayerInfo[playerid][pPayDayHad]);
dini_IntSet(string3, "Watch",PlayerInfo[playerid][pWatch]);
dini_IntSet(string3, "Crashed",PlayerInfo[playerid][pCrashed]);
dini_IntSet(string3, "Wins",PlayerInfo[playerid][pWins]);
dini_IntSet(string3, "Loses",PlayerInfo[playerid][pLoses]);
dini_IntSet(string3, "AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
dini_IntSet(string3, "DrugPerk",PlayerInfo[playerid][pDrugPerk]);
dini_IntSet(string3, "MiserPerk",PlayerInfo[playerid][pMiserPerk]);
dini_IntSet(string3, "PainPerk",PlayerInfo[playerid][pPainPerk]);
dini_IntSet(string3, "TraderPerk",PlayerInfo[playerid][pTraderPerk]);
dini_IntSet(string3, "Tutorial",PlayerInfo[playerid][pTut]);
dini_IntSet(string3, "VirWorld",PlayerInfo[playerid][pVirWorld]);
dini_IntSet(string3, "Fuel",PlayerInfo[playerid][pFuel]);
dini_IntSet(string3, "Married",PlayerInfo[playerid][pMarried]);
dini_Set(string3, "MarriedTo",PlayerInfo[playerid][pMarriedTo]);
dini_IntSet(string3, "FishTool",PlayerInfo[playerid][pFishTool]);
dini_Set(string3, "WhyLeft",PlayerInfo[playerid][pWhyLeft]);
dini_Set(string3, "Note1",PlayerInfo[playerid][pNote1]);
dini_IntSet(string3, "Note1s",PlayerInfo[playerid][pNote1s]);
dini_Set(string3, "Note2",PlayerInfo[playerid][pNote2]);
dini_IntSet(string3, "Note2s",PlayerInfo[playerid][pNote2s]);
dini_Set(string3, "Note3",PlayerInfo[playerid][pNote3]);
dini_IntSet(string3, "Note3s",PlayerInfo[playerid][pNote3s]);
dini_Set(string3, "Note4",PlayerInfo[playerid][pNote4]);
dini_IntSet(string3, "Note4s",PlayerInfo[playerid][pNote4s]);
dini_Set(string3, "Note5",PlayerInfo[playerid][pNote5]);
dini_IntSet(string3, "Note5s",PlayerInfo[playerid][pNote5s]);
dini_IntSet(string3, "InvWeapon",PlayerInfo[playerid][pInvWeapon]);
dini_IntSet(string3, "InvAmmo",PlayerInfo[playerid][pInvAmmo]);
dini_IntSet(string3, "InvWeapon2",PlayerInfo[playerid][pInvWeapon2]);
dini_IntSet(string3, "InvAmmo2",PlayerInfo[playerid][pInvAmmo2]);
dini_IntSet(string3, "InvWeapon3",PlayerInfo[playerid][pInvWeapon3]);
dini_IntSet(string3, "InvAmmo3",PlayerInfo[playerid][pInvAmmo3]);
dini_IntSet(string3, "InvWeapon4",PlayerInfo[playerid][pInvWeapon4]);
dini_IntSet(string3, "InvAmmo4",PlayerInfo[playerid][pInvAmmo4]);
dini_IntSet(string3, "InvWeapon5",PlayerInfo[playerid][pInvWeapon5]);
dini_IntSet(string3, "InvAmmo5",PlayerInfo[playerid][pInvAmmo5]);
dini_IntSet(string3, "InvWeapon6",PlayerInfo[playerid][pInvWeapon6]);
dini_IntSet(string3, "InvAmmo6",PlayerInfo[playerid][pInvAmmo6]);
dini_IntSet(string3, "Lighter",PlayerInfo[playerid][pLighter]);
dini_IntSet(string3, "Cigarettes",PlayerInfo[playerid][pCigarettes]);
dini_IntSet(string3, "DDManager",PlayerInfo[playerid][pDM]);
dini_IntSet(string3, "OnDuty",PlayerInfo[playerid][pDuty]);
dini_IntSet(string3, "Warnings",PlayerInfo[playerid][pWarned]);
dini_IntSet(string3, "Swat",PlayerInfo[playerid][pSwat]);
dini_IntSet(string3, "Fighting",PlayerInfo[playerid][pFS]);
dini_IntSet(string3, "Boxing",PlayerInfo[playerid][pBoxiSkill]);
dini_IntSet(string3, "KneeHead",PlayerInfo[playerid][pKneeSkill]);
dini_IntSet(string3, "KungFu",PlayerInfo[playerid][pKungSkill]);
dini_IntSet(string3, "GrabKick",PlayerInfo[playerid][pGrabSkill]);
dini_IntSet(string3, "Elbow",PlayerInfo[playerid][pElbowSkill]);
dini_IntSet(string3, "Tactical",PlayerInfo[playerid][pTactical]);
dini_IntSet(string3, "SpecialF",PlayerInfo[playerid][pSpecialF]);
dini_IntSet(string3, "DutyBanned",PlayerInfo[playerid][pDBanned]);
dini_IntSet(string3, "DDTicket",PlayerInfo[playerid][pDTK]);
dini_IntSet(string3, "DDSTicket",PlayerInfo[playerid][pDSTK]);
dini_IntSet(string3, "Speedo",PlayerInfo[playerid][pSpeedo]);
dini_IntSet(string3, "HydraDriver",PlayerInfo[playerid][pHydraR]);
dini_IntSet(string3, "HunterDriver",PlayerInfo[playerid][pHunterR]);
dini_IntSet(string3, "RhinoDriver",PlayerInfo[playerid][pRhinoR]);
dini_IntSet(string3, "PredatorDriver",PlayerInfo[playerid][pPredR]);
dini_IntSet(string3, "ViewPms",PlayerInfo[playerid][pViewPms]);
dini_IntSet(string3, "AppearList",PlayerInfo[playerid][pAppearList]);
dini_IntSet(string3, "AmmunationTime",PlayerInfo[playerid][pAmmuTrainTime]);
dini_IntSet(string3, "PistolSkill",PlayerInfo[playerid][pPistSkill]);
dini_IntSet(string3, "SilencedSkill",PlayerInfo[playerid][pSilenSkill]);
dini_IntSet(string3, "DesertSkill",PlayerInfo[playerid][pDesertSkill]);
dini_IntSet(string3, "ShotgunSkill",PlayerInfo[playerid][pShotgSkill]);
dini_IntSet(string3, "SawnoffSkill",PlayerInfo[playerid][pSawnSkill]);
dini_IntSet(string3, "CombatSkill",PlayerInfo[playerid][pCombSkill]);
dini_IntSet(string3, "UziSkill",PlayerInfo[playerid][pUziSkill]);
dini_IntSet(string3, "SMGSkill",PlayerInfo[playerid][pSmgSkill]);
dini_IntSet(string3, "AK47Skill",PlayerInfo[playerid][pAkSkill]);
dini_IntSet(string3, "M4Skill",PlayerInfo[playerid][pM4Skill]);
dini_IntSet(string3, "TutorialDone",PlayerInfo[playerid][pTutDone]);
dini_IntSet(string3, "RegularCount",PlayerInfo[playerid][pRegularCount]);
dini_IntSet(string3, "PassportTime",PlayerInfo[playerid][pPassportTime]);
dini_IntSet(string3, "OfficerTime",PlayerInfo[playerid][pOfficerTime]);
dini_IntSet(string3, "Achievement0",PlayerInfo[playerid][pAchievement0]);
dini_IntSet(string3, "Achievement1",PlayerInfo[playerid][pAchievement1]);
dini_IntSet(string3, "Achievement2",PlayerInfo[playerid][pAchievement2]);
dini_IntSet(string3, "Achievement3",PlayerInfo[playerid][pAchievement3]);
dini_IntSet(string3, "Achievement4",PlayerInfo[playerid][pAchievement4]);
dini_IntSet(string3, "Achievement5",PlayerInfo[playerid][pAchievement5]);
dini_IntSet(string3, "Achievement6",PlayerInfo[playerid][pAchievement6]);
dini_IntSet(string3, "Achievement7",PlayerInfo[playerid][pAchievement7]);
dini_IntSet(string3, "Achievement8",PlayerInfo[playerid][pAchievement8]);
dini_IntSet(string3, "Achievement9",PlayerInfo[playerid][pAchievement9]);
dini_IntSet(string3, "Achievement10",PlayerInfo[playerid][pAchievement10]);
dini_IntSet(string3, "Achievement11",PlayerInfo[playerid][pAchievement11]);
dini_IntSet(string3, "Achievement12",PlayerInfo[playerid][pAchievement12]);
dini_IntSet(string3, "Achievement13",PlayerInfo[playerid][pAchievement13]);
dini_IntSet(string3, "Achievement14",PlayerInfo[playerid][pAchievement14]);
dini_IntSet(string3, "Achievement15",PlayerInfo[playerid][pAchievement15]);
dini_IntSet(string3, "Achievement16",PlayerInfo[playerid][pAchievement16]);
dini_IntSet(string3, "Achievement17",PlayerInfo[playerid][pAchievement17]);
dini_IntSet(string3, "Achievement18",PlayerInfo[playerid][pAchievement18]);
dini_IntSet(string3, "Achievement19",PlayerInfo[playerid][pAchievement19]);
dini_IntSet(string3, "Achievement20",PlayerInfo[playerid][pAchievement20]);
dini_IntSet(string3, "ShiftName",PlayerInfo[playerid][pShiftName]);
dini_IntSet(string3, "Weapon",PlayerInfo[playerid][pWeapon]);
dini_IntSet(string3, "Ammo",PlayerInfo[playerid][pAmmo]);
dini_IntSet(string3, "Weapon2",PlayerInfo[playerid][pWeapon2]);
dini_IntSet(string3, "Ammo2",PlayerInfo[playerid][pAmmo2]);
dini_IntSet(string3, "Weapon3",PlayerInfo[playerid][pWeapon3]);
dini_IntSet(string3, "Ammo3",PlayerInfo[playerid][pAmmo3]);
dini_IntSet(string3, "Weapon4",PlayerInfo[playerid][pWeapon4]);
dini_IntSet(string3, "Ammo4",PlayerInfo[playerid][pAmmo4]);
dini_IntSet(string3, "Weapon5",PlayerInfo[playerid][pWeapon5]);
dini_IntSet(string3, "Ammo5",PlayerInfo[playerid][pAmmo5]);
dini_IntSet(string3, "Weapon6",PlayerInfo[playerid][pWeapon6]);
dini_IntSet(string3, "Ammo6",PlayerInfo[playerid][pAmmo6]);
dini_IntSet(string3, "Weapon7",PlayerInfo[playerid][pWeapon7]);
dini_IntSet(string3, "Ammo7",PlayerInfo[playerid][pAmmo7]);
dini_IntSet(string3, "Weapon8",PlayerInfo[playerid][pWeapon8]);
dini_IntSet(string3, "Ammo8",PlayerInfo[playerid][pAmmo8]);
dini_IntSet(string3, "Weapon9",PlayerInfo[playerid][pWeapon9]);
dini_IntSet(string3, "Ammo9",PlayerInfo[playerid][pAmmo9]);
dini_IntSet(string3, "Weapon10",PlayerInfo[playerid][pWeapon10]);
dini_IntSet(string3, "Ammo10",PlayerInfo[playerid][pAmmo10]);
dini_IntSet(string3, "Weapon11",PlayerInfo[playerid][pWeapon11]);
dini_IntSet(string3, "Ammo11",PlayerInfo[playerid][pAmmo11]);
dini_IntSet(string3, "Weapon12",PlayerInfo[playerid][pWeapon12]);
dini_IntSet(string3, "Ammo12",PlayerInfo[playerid][pAmmo12]);
dini_IntSet(string3, "Atc",PlayerInfo[playerid][pAtc]);
dini_IntSet(string3, "AtcRadio",PlayerInfo[playerid][pAtcRadio]);
dini_IntSet(string3, "Pending",PlayerInfo[playerid][pPending]);
dini_Set(string3, "PendingInfo",PlayerInfo[playerid][pPendingInfo]);
dini_IntSet(string3, "ChatMode",PlayerInfo[playerid][pChatMode]);
dini_Set(string3, "Punishment1",PlayerInfo[playerid][pPunishment1]);
dini_Set(string3, "Punishment2",PlayerInfo[playerid][pPunishment2]);
dini_Set(string3, "Punishment3",PlayerInfo[playerid][pPunishment3]);
dini_Set(string3, "Punishment4",PlayerInfo[playerid][pPunishment4]);
dini_Set(string3, "Punishment5",PlayerInfo[playerid][pPunishment5]);
dini_Set(string3, "Punishment6",PlayerInfo[playerid][pPunishment6]);
dini_Set(string3, "Punishment7",PlayerInfo[playerid][pPunishment7]);
dini_Set(string3, "Punishment8",PlayerInfo[playerid][pPunishment8]);
dini_IntSet(string3, "NextPunishment",PlayerInfo[playerid][pNextPunishment]);
dini_IntSet(string3, "PunishedTimes",PlayerInfo[playerid][pPunished]);
dini_IntSet(string3, "TazerBullets",PlayerInfo[playerid][pTazerBullets]);
dini_Set(string3, "IP",PlayerInfo[playerid][pIP]);
dini_Set(string3, "LastLogged",PlayerInfo[playerid][pLastSeen]);
dini_IntSet(string3, "Changed",PlayerInfo[playerid][pChanged]);
dini_Set(string3, "RegistredDate",PlayerInfo[playerid][pRegistredDate]);
dini_IntSet(string3, "BizzEntered",BizzEntered[playerid]);
dini_IntSet(string3, "HouseEntered",HouseEntered[playerid]);
dini_IntSet(string3, "Decoder",PlayerInfo[playerid][pDecoder]);
dini_IntSet(string3, "Banned",PlayerInfo[playerid][pBanned]);
ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_INPUT,"Welcome, Please Log-In","Account Successfuly Registred into the database!\nType your password below to log-in","Log-in","Quit");
new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d) [%d:%d:%d] %s Has registred in under IP %s.",d,m,y,h,mi,s,playername3,playersip);
PlayerInfo[playerid][pReg] = 0;
LoginLog(string);
}
return 1;
}