PUBLIC: OnPlayerLogin(playerid,password[])
{
new tmp2[256];
new string2[64];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "Users/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
{
new key[ 256 ] , val[ 256 ];
new Data[ 256 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); }
if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
if( strcmp( key , "AgeTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAgeTime] = strval( val ); }
if( strcmp( key , "Wanted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWanted] = strval( val ); }
if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = strval( val ); }
if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
if( strcmp( key , "Roliki" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRoliki] = strval( val ); }
if( strcmp( key , "Udochka" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUdochka] = strval( val ); }
if( strcmp( key , "NarcoZavisimost" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNarcoZavisimost] = strval( val ); }
if( strcmp( key , "AlcoZavisimost" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoZavisimost] = strval( val ); }
if( strcmp( key , "LangEng", true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangEng] = strval( val ); }
if( strcmp( key , "LangJap", true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangJap] = strval( val ); }
if( strcmp( key , "LangIta", true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangIta] = strval( val ); }
if( strcmp( key , "LangRus", true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangRus] = strval( val ); }
if( strcmp( key , "LangFra", true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLangFra] = strval( val ); }
if( strcmp( key , "NarcoLomka" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNarcoLomka] = strval( val ); }
if( strcmp( key , "AlcoLomka" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoLomka] = strval( val ); }
if( strcmp( key , "UnworkingTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUnworkingTime] = strval( val ); }
if( strcmp( key , "RabotalLopatoy" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRabotalLopatoy] = strval( val ); }
if( strcmp( key , "BankAcc" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBankAcc] = strval( val ); }
if( strcmp( key , "BankPass" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBankPass] = strval( val ); }
if( strcmp( key , "OtkRabota1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota1] = strval( val ); }
if( strcmp( key , "OtkRabota2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota2] = strval( val ); }
if( strcmp( key , "OtkRabota3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota3] = strval( val ); }
if( strcmp( key , "OtkRabota7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota7] = strval( val ); }
if( strcmp( key , "OtkRabota" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota8] = strval( val ); }
if( strcmp( key , "OtkRabota12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota12] = strval( val ); }
if( strcmp( key , "OtkRabota14" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota14] = strval( val ); }
if( strcmp( key , "OtkRabota15" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota15] = strval( val ); }
if( strcmp( key , "OtkRabota16" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota16] = strval( val ); }
if( strcmp( key , "OtkRabota22" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota22] = strval( val ); }
if( strcmp( key , "OtkRabota24" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota24] = strval( val ); }
if( strcmp( key , "OtkRabota10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota10] = strval( val ); }
if( strcmp( key , "OtkRabota11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota11] = strval( val ); }
if( strcmp( key , "OtkRabota13" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOtkRabota13] = strval( val ); }
if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedDeaths] = strval( val ); }
if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishes] = strval( val ); }
if( strcmp( key , "BiggestFish" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBiggestFish] = strval( val ); }
if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
if( strcmp( key , "MedicTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMedicTime] = strval( val ); }
if( strcmp( key , "NeedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNeedTime] = strval( val ); }
if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); }
if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
if( strcmp( key , "pRace" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRace] = strval( val ); }
if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = strval( val ); }
if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); }
if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); }
if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); }
if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); }
if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); }
if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); }
if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); }
if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); }
if( strcmp( key , "CookSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCookSkill] = strval( val ); }
if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); }
if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
if( strcmp( key , "Virtual" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVirtual] = strval( val ); }
if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
if( strcmp( key , "Apart" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPapptkey] = strval( val ); }
if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
if( strcmp( key , "MotoLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMotoLic] = strval( val ); }
if( strcmp( key , "TruckLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTruckLic] = strval( val ); }
if( strcmp( key , "BusLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBusLic] = strval( val ); }
if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); }
if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
if( strcmp( key , "GunLicAllow" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLicAllow] = strval( val ); }
if( strcmp( key , "Gun0" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun0] = strval( val ); }
if( strcmp( key , "Gun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); }
if( strcmp( key , "Gun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); }
if( strcmp( key , "Gun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); }
if( strcmp( key , "Gun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); }
if( strcmp( key , "Gun5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun5] = strval( val ); }
if( strcmp( key , "Gun6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun6] = strval( val ); }
if( strcmp( key , "Gun7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun7] = strval( val ); }
if( strcmp( key , "Gun8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun8] = strval( val ); }
if( strcmp( key , "Gun9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun9] = strval( val ); }
if( strcmp( key , "Gun10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun10] = strval( val ); }
if( strcmp( key , "Gun11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun11] = strval( val ); }
if( strcmp( key , "Ammo0" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo0] = strval( val ); }
if( strcmp( key , "Ammo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); }
if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
if( strcmp( key , "Ammo5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo5] = strval( val ); }
if( strcmp( key , "Ammo6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo6] = strval( val ); }
if( strcmp( key , "Ammo7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo7] = strval( val ); }
if( strcmp( key , "Ammo8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo8] = strval( val ); }
if( strcmp( key , "Ammo9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo9] = strval( val ); }
if( strcmp( key , "Ammo10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo10] = strval( val ); }
if( strcmp( key , "Ammo11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo11] = strval( val ); }
if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); }
if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWins] = strval( val ); }
if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLoses] = strval( val ); }
if( strcmp( key , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); }
if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugPerk] = strval( val ); }
if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMiserPerk] = strval( val ); }
if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainPerk] = strval( val ); }
if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTraderPerk] = strval( val ); }
if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
if( strcmp( key , "Mission" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMissionNr] = strval( val ); }
if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = strval( val ); }
if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuel] = strval( val ); }
if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); }
if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "TA" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTA] = strval( val ); }
if( strcmp( key , "Rope" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRope] = strval( val ); }
if( strcmp( key , "SK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSK] = strval( val ); }
if( strcmp( key , "SD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSD] = strval( val ); }
if( strcmp( key , "STD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSTD] = strval( val ); }
if( strcmp( key , "Spawn" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpawn] = strval( val ); }
if( strcmp( key , "SQ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSQ] = strval( val ); }
if( strcmp( key , "Clock" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pClock] = strval( val ); }
if( strcmp( key , "Sigs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSigs] = strval( val ); }
if( strcmp( key , "BageNum" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBageNum] = strval( val ); }
/* if( strcmp( key , "Carkey1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarkey1] = strval( val ); }
if( strcmp( key , "Carkey2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarkey2] = strval( val ); }
if( strcmp( key , "Carkey3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarkey3] = strval( val ); }*/
if( strcmp( key , "Lang" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLang] = strval( val ); }
if( strcmp( key , "RPD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRPD] = strval( val ); }
if( strcmp( key , "Zoloto" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pZoloto] = strval( val ); }
if( strcmp( key , "GPS" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGPS] = strval( val ); }
//if( strcmp( key , "Lom" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLom] = strval( val ); }
if( strcmp( key , "Pasport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPasport] = strval( val ); }
if( strcmp( key , "NeSdal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNeSdal] = strval( val ); }
if( strcmp( key , "Radio" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRadio] = strval( val ); }
if( strcmp( key , "RobbedBank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRobbedBank] = strval( val ); }//кол-во грабить банк за час
if( strcmp( key , "MuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuteTime] = strval( val ); }//анти смайлик
if( strcmp( key , "BoxFightStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxing] = strval( val ); }
if( strcmp( key , "KunfuFightStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKunfu] = strval( val ); }
if( strcmp( key , "KneeheadFightStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKneehead] = strval( val ); }
if( strcmp( key , "GrabkickFightStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGrabkick] = strval( val ); }
if( strcmp( key , "ElbowFightStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pElbow] = strval( val ); }
if( strcmp( key , "Note1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note1s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote1s] = strval( val ); }
if( strcmp( key , "Note2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note2s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote2s] = strval( val ); }
if( strcmp( key , "Note3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote3], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note3s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote3s] = strval( val ); }
if( strcmp( key , "Note4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote4], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note4s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote4s] = strval( val ); }
if( strcmp( key , "Note5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote5], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note5s" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNote5s] = strval( val ); }
if( strcmp( key , "WantedLewelSec" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedLewelSec] = strval( val ); }
if( strcmp( key , "CashCredit" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCashCredit] = strval( val ); }
if( strcmp( key , "Credit" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCredit] = strval( val ); }
if( strcmp( key , "CreditTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCreditTime] = strval( val ); }
if( strcmp( key , "JobTime", true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJobTime] = strval( val ); }
if( strcmp( key , "ArmBil" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmBil] = strval( val ); }
if( strcmp( key , "Moder" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModer] = strval( val ); }
if( strcmp( key , "VorSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVorSkill] = strval( val ); }
if( strcmp( key , "Car" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCar] = strval( val ); }
if( strcmp( key , "Alarm" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSignaliz] = strval( val ); }
if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = strval( val ); }
}
fclose(UserFile);
}
else
if( strcmp( key , "Apteka" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pApteka] = strval( val); }
if( strcmp( key , "Vita" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVita] = strval( val ); }
{
SendClientMessage(playerid, COLOR_WHITE, "*Пароль неверный.");
new loginstring[200];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"Ошибка: Вы ввели неверный пароль.\nПопробуйте ввести пароль заного.\n{FF0000}Помните: У вас всего 3 попытки ввода пароля.",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FFFFFF}Авторизация: Our RP",loginstring,"Войти","Выход");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
return 1;
}
Cameras[playerid] = 0;
PlayerInfo[playerid][pAdjustable] = 0;
ResetPlayerMoney(playerid);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pMuteTime]=0; //анти смайлик
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pSHealth] = 0.0;
PlayerInfo[playerid][pHealth] = 50.0;
PlayerInfo[playerid][pPos_x] = 2246.6;
PlayerInfo[playerid][pPos_y] = -1161.9;
PlayerInfo[playerid][pPos_z] = 1029.7;
PlayerInfo[playerid][pInt] = 15;
PlayerInfo[playerid][pVirtual] = 0;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pModel] = 7;
new randphone = 100000 + random(899999);//minimum 1000 max 9999 //giving one at the start
PlayerInfo[playerid][pPnumber] = randphone;
PlayerInfo[playerid][pPhousekey] = 255;
PlayerInfo[playerid][pPapptkey] = 255;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pAccount] = 0;
ServerGivePlayerMoney(playerid, 3000);
PlayerInfo[playerid][pReg] = 1;
}
if(PlayerInfo[playerid][pLevel] == -999) //autoban
{
Ban(playerid);
}
else if(PlayerInfo[playerid][pCK] > 0)
{
Kick(playerid);
}
new playerIP[15];
GetPlayerIp(playerid, playerIP, sizeof(playerIP));
if(PlayerInfo[playerid][pLang] == 0)
{
format(string2, sizeof(string2), "(( %s вxoдuт в uгpy ))",playername2);
ABroadCast(COLOR_GRAD2,string2, 1);
//format(string2, sizeof(string2), "(( IP: %s ))", playerIP);
//ABroadCast(COLOR_GRAD2,string2, 1);
}
else if(PlayerInfo[playerid][pLang] == 1)
{
format(string2, sizeof(string2), "(( %s enter the game ))",playername2);
ABroadCast(COLOR_GRAD2,string2, 1);
format(string2, sizeof(string2), "(( IP: %s ))", playerIP);
ABroadCast(COLOR_GRAD2,string2, 1);
}
printf("%s has logged in. IP:%s",playername2, playerIP);
if (PlayerInfo[playerid][pDonateRank] > 0)
{
if(PlayerInfo[playerid][pLang] == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"*Вы VIP игрок.");
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"SERVER: You are a Premium Account user.");
}
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
if(PlayerInfo[playerid][pLang] == 0)
{
SendClientMessage(playerid, COLOR_GREEN,"*Загрузка аккаунта.");
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: Status Check....");
}
if (PlayerInfo[playerid][pAdmin] == 1)
{
if(PlayerInfo[playerid][pLang] == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"*Вы модератор на испытательном сроке.");
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: You are logged in as a GameMaster.");
}
}
if (PlayerInfo[playerid][pAdmin] == 2)
{
if(PlayerInfo[playerid][pLang] == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"*Вы помошник модератора.");
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: You are logged in as a GameMaster.");
}
}
if (PlayerInfo[playerid][pAdmin] == 3)
{
if(PlayerInfo[playerid][pLang] == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"*Вы модератор сервера.");
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: You are logged in as a co-admin.");
}
}
if (PlayerInfo[playerid][pAdmin] == 4)
{
if(PlayerInfo[playerid][pLang] == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"*Вы Старший модератор сервера.");
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: You are logged in as a co-admin.");
}
}
if (PlayerInfo[playerid][pAdmin] == 7)
{
if(PlayerInfo[playerid][pLang] == 0)
{
SendClientMessage(playerid, COLOR_WHITE,"*Вы помошник главного администратора.");
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: You are logged in as a admin.");
}
}
if (PlayerInfo[playerid][pAdmin] == 8)
{
if(PlayerInfo[playerid][pLang] == 0)
{
format(string2, sizeof(string2), "Вы главный администратор.");
SendClientMessage(playerid, COLOR_WHITE,string2);
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: You are logged in as a main administrator.");
}
}
if (PlayerInfo[playerid][pModer] == 1)
{
if(PlayerInfo[playerid][pLang] == 0)
{
format(string2, sizeof(string2), "Вы модератор сервера.");
SendClientMessage(playerid, COLOR_WHITE,string2);
}
else if(PlayerInfo[playerid][pLang] == 1)
{
SendClientMessage(playerid, COLOR_WHITE,"|SERVER: You are logged in as a main administrator.");
}
}
}
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
if(gTeam[playerid] == 0)
{
gTeam[playerid] = 3;
}
else
{
gTeam[playerid] = PlayerInfo[playerid][pTeam];
}
gPlayerLogged[playerid] = 1;
LocalTemp[playerid] = "Free";
format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~y~ %s", playername2);
SpawnPlayer(playerid);
TogglePlayerSpectating(playerid, false);
GameTextForPlayer(playerid, tmp2, 5000, 1);
SendClientMessage(playerid, COLOR_YELLOW, motd);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pMask] == 1)
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
}
}
DateProp(playerid);
return 1;
}
stock ini_GetKey( line[] )
{
new keyRes[256];
keyRes[0] = 0;
if ( strfind( line , "=" , true ) == -1 ) return keyRes;
strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
return keyRes;
}
stock ini_GetValue( line[] )
{
new valRes[256];
valRes[0]=0;
if ( strfind( line , "=" , true ) == -1 ) return valRes;
strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
return valRes;
}