03.02.2012, 18:24
so i go in game play and then i go in my name to give me admin then i go in game and then i get no admin if i relog it askes again for male.female.please help!this happens only if i play in host!!!!
forward SaveAccounts(); accountstimer = SetTimer("SaveAccounts", 1000, 1); //5 mins every account saved public SaveAccounts() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { OnPlayerUpdateEx(i); if(PlayerInfo[i][pJob] > 0) { if(PlayerInfo[i][pContractTime] < 25) { PlayerInfo[i][pContractTime] ++; } } } } }
public OnPlayerRegister(playerid, password[]) { if(IsPlayerConnected(playerid)) { new string3[64]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); format(string3, sizeof(string3), "%s.ini", playername3); new File: hFile = fopen(string3, io_write); if (hFile) { strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255); new var[32]; format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var); PlayerInfo[playerid][pCash] = GetPlayerCash(playerid); format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var); format(var, 32, "Wanted=%d\n",PlayerInfo[playerid][pWantedLevel]);fwrite(hFile, var); format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var); format(var, 32, "HelperLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var); format(var, 64, "Lighter=%d\n",PlayerInfo[playerid][pLighter]);fwrite(hFile, var); format(var, 64, "Cigarettes=%d\n",PlayerInfo[playerid][pCigarettes]);fwrite(hFile, var); format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var); format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var); format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var); format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var); format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var); format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var); format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var); format(var, 32, "CK=%d\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var); format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var); format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var); format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var); format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var); format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var); format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var); format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var); format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var); format(var, 32, "WantedDeaths=%d\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var); format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var); format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var); format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var); format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var); format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var); format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var); format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var); format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var); format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var); format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var); format(var, 32, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var); format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var); format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var); format(var, 32, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var); format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var); format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var); format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var); format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var); format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var); format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var); format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var); format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var); format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var); format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var); format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var); format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var); format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var); format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var); format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var); GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]); format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var); format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var); format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var); format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var); format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var); format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var); format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var); format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var); format(var, 32, "RobSkill=%d\n",PlayerInfo[playerid][pRobSkill]);fwrite(hFile, var); format(var, 32, "Rob=%d\n",PlayerInfo[playerid][pRob]);fwrite(hFile, var);