PHP код:
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "accounts/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[32];
format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
PlayerInfo[playerid][pMoney] = GetMoney(playerid);
format(var, 32, "pFWarns=%d\n",PlayerInfo[playerid][pFWarns]);fwrite(hFile, var);
format(var, 32, "pAWarns=%d\n",PlayerInfo[playerid][pAWarns]);fwrite(hFile, var);
format(var, 32, "pLWarns=%d\n",PlayerInfo[playerid][pLWarns]);fwrite(hFile, var);
format(var, 32, "RpTest=%d\n",PlayerInfo[playerid][pRpTest]);fwrite(hFile, var);//ÐÏ òåñò
format(var, 32, "Pin=%d\n",PlayerInfo[playerid][pPin]);fwrite(hFile, var);
format(var, 32, "AdminPass=%d\n",PlayerInfo[playerid][pAdminPass]);fwrite(hFile, var);
format(var, 32, "MedCard=%d\n",PlayerInfo[playerid][pMedCard]);fwrite(hFile, var);
format(var, 32, "HouseKey=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
format(var, 32, "ArmBil=%d\n",PlayerInfo[playerid][pArmBil]);fwrite(hFile, var);
format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "Spawn=%d\n",PlayerInfo[playerid][pSpawn]);fwrite(hFile, var);
format(var, 32, "Fish=%d\n",PlayerInfo[playerid][pFish]);fwrite(hFile, var);
format(var, 32, "Fishing=%d\n",PlayerInfo[playerid][pFishing]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdministrator]);fwrite(hFile, var);
format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);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, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
format(var, 32, "Money=%d\n",PlayerInfo[playerid][pMoney]);fwrite(hFile, var);
format(var, 32, "DMoney=%d\n",PlayerInfo[playerid][pDMoney]);fwrite(hFile, var);
format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
format(var, 32, "PhoneMoney=%d\n",PlayerInfo[playerid][pPhoneMoney]);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, "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, "Mask=%d\n",PlayerInfo[playerid][pMask]);fwrite(hFile, var);
format(var, 32, "Matsss=%d\n",PlayerInfo[playerid][pMatsss]);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, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);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, "Clock=%d\n",PlayerInfo[playerid][pClock]);fwrite(hFile, var);//ïîêóïêà ÷àñîâ â 24/7
format(var, 32, "Pasport=%d\n",PlayerInfo[playerid][pPasport]);fwrite(hFile, var);
format(var, 32, "RobbedBank=%d\n",PlayerInfo[playerid][pRobbedBank]);fwrite(hFile, var);
format(var, 32, "pRazlid=%d\n",PlayerInfo[playerid][pRazlid]);fwrite(hFile, var);
if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
{
PlayerInfo[playerid][pPos_x] = -124.6325;
PlayerInfo[playerid][pPos_y] = 981.1688;
PlayerInfo[playerid][pPos_z] = 12.1494;
}
format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
format(var, 32, "Stil1=%d\n",PlayerInfo[playerid][pStil1]);fwrite(hFile, var);
format(var, 32, "Stil2=%d\n",PlayerInfo[playerid][pStil2]);fwrite(hFile, var);
format(var, 32, "Stil3=%d\n",PlayerInfo[playerid][pStil3]);fwrite(hFile, var);
format(var, 32, "CarLicA=%d\n",PlayerInfo[playerid][pCarLicA]);fwrite(hFile, var);
format(var, 32, "CarLicB=%d\n",PlayerInfo[playerid][pCarLicB]);fwrite(hFile, var);
format(var, 32, "CarLicC=%d\n",PlayerInfo[playerid][pCarLicC]);fwrite(hFile, var);
format(var, 32, "CarLicD=%d\n",PlayerInfo[playerid][pCarLicD]);fwrite(hFile, var);
format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
format(var, 32, "Wanted=%d\n",PlayerInfo[playerid][pWanted]);fwrite(hFile, var);
format(var, 32, "Pasport=%d\n",PlayerInfo[playerid][pPasport]);fwrite(hFile, var);
format(var, 32, "Tros=%d\n",PlayerInfo[playerid][pTros]);fwrite(hFile, var);//Òðîñ äëÿ àâòî
format(var, 32, "pCareding1=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
format(var, 32, "pCareding2=%d\n",PlayerInfo[playerid][pWanted]);fwrite(hFile, var);
format(var, 32, "pCareding3=%d\n",PlayerInfo[playerid][pPasport]);fwrite(hFile, var);
format(var, 32, "pDrugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
format(var, 32, "pNarcoLomka=%d\n",PlayerInfo[playerid][pNarcoLomka]);fwrite(hFile, var);
format(var, 32, "pVezualka=%d\n",PlayerInfo[playerid][pVezualka]);fwrite(hFile, var);
format(var, 32, "pBoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
format(var, 32, "pKongfuSkill=%d\n",PlayerInfo[playerid][pKongfuSkill]);fwrite(hFile, var);
format(var, 32, "pKickboxSkill=%d\n",PlayerInfo[playerid][pKickboxSkill]);fwrite(hFile, var);
format(var, 32, "pBich=%d\n",PlayerInfo[playerid][pBich]);fwrite(hFile, var);
format(var, 32, "pBiched=%d\n",PlayerInfo[playerid][pBiched]);fwrite(hFile, var);
format(var, 32, "lTimeadm=%d\n",PlayerInfo[playerid][lTimeadm]);fwrite(hFile, var);
format(var, 32, "pGun1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
format(var, 32, "pGun2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
format(var, 32, "pGun3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
format(var, 32, "pGun4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
format(var, 32, "pAmmo1=%d\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
format(var, 32, "pAmmo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
format(var, 32, "pAmmo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
format(var, 32, "pAmmo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
format(var, 32, "pHospitalTime=%d\n",PlayerInfo[playerid][pHospitalTime]);fwrite(hFile, var);
format(var, 32, "Timerzakaz=%d\n",PlayerInfo[playerid][pTimerzakaz]);fwrite(hFile, var);
format(var, 32, "Timerzakazsik=%d\n",PlayerInfo[playerid][pTimerzakazsik]);fwrite(hFile, var);
format(var, 32, "Timerzamena=%d\n",PlayerInfo[playerid][pTimerzamena]);fwrite(hFile, var);
format(var, 32, "TimeVhod=%d\n",PlayerInfo[playerid][pTimeVhod]);fwrite(hFile, var);
format(var, 32, "Idebil=%d\n",PlayerInfo[playerid][pIdebil]);fwrite(hFile, var);
format(var, 32, "Premium=%d\n",PlayerInfo[playerid][pPremium]);fwrite(hFile, var);
format(var, 32, "Areport=%d",PlayerInfo[playerid][pAreport]);fwrite(hFile, var);
format(var, 32, "Aban=%d",PlayerInfo[playerid][pAban]);fwrite(hFile, var);
format(var, 32, "Awarn=%d",PlayerInfo[playerid][pAwarn]);fwrite(hFile, var);
format(var, 32, "Akick=%d",PlayerInfo[playerid][pAkick]);fwrite(hFile, var);
fclose(hFile);
}
PHP код:
CALLBACK: OnPlayerLogin(playerid,password[])
{
new string2[128];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "accounts/%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 , "pFWarns" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFWarns] = strval( val ); }
if( strcmp( key , "pAWarns" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAWarns] = strval( val ); }
if( strcmp( key , "pLWarns" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLWarns] = strval( val ); }
if( strcmp( key , "RpTest" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRpTest] = strval( val ); }//РП тест
if( strcmp( key , "Pin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPin] = strval( val ); }
if( strcmp( key , "AdminPass" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdminPass] = strval( val ); }
if( strcmp( key , "MedCard" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMedCard] = strval( val ); }
if( strcmp( key , "ArmBil" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmBil] = strval( val ); }
if( strcmp( key , "Stil1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pStil1] = strval( val ); }
if( strcmp( key , "Stil2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pStil2] = strval( val ); }
if( strcmp( key , "Stil3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pStil3] = strval( val ); }
if( strcmp( key , "HouseKey" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "Spawn" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpawn] = strval( val ); }
if( strcmp( key , "Fish" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFish] = strval( val ); }
if( strcmp( key , "Fishing" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishing] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdministrator] = strval( val ); }
if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); }
if( strcmp( key , "MuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuteTime] = 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 , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMoney] = strval( val ); }
if( strcmp( key , "DMoney" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDMoney] = strval( val ); }
if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
if( strcmp( key , "PhoneMoney" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneMoney] = 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 , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = 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 , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
if( strcmp( key , "Mask" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMask] = strval( val ); }
if( strcmp( key , "Matsss" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMatsss] = 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 , "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 , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = 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 , "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 , "pRazlid" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRazlid] = strval( val ); }
if( strcmp( key , "CarLicA" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLicA] = strval( val ); }
if( strcmp( key , "CarLicB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLicB] = strval( val ); }
if( strcmp( key , "CarLicC" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLicC] = strval( val ); }
if( strcmp( key , "CarLicD" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLicD] = 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 , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
if( strcmp( key , "Wanted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWanted] = strval( val ); }
if( strcmp( key , "Clock" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pClock] = strval( val ); }//покупка часов в 24/
if( strcmp( key , "Pasport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPasport] = strval( val ); }
if( strcmp( key , "Tros" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTros] = strval( val ); }//Трос для авто
if( strcmp( key , "pCareding1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCareding1] = strval( val ); }
if( strcmp( key , "pCareding2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCareding2] = strval( val ); }
if( strcmp( key , "pCareding3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCareding3] = strval( val ); }
if( strcmp( key , "pDrugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); }
if( strcmp( key , "pNarcoLomka" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNarcoLomka] = strval( val ); }
if( strcmp( key , "pVezualka" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVezualka] = strval( val ); }
if( strcmp( key , "pBoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
if( strcmp( key , "pKongfuSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKongfuSkill] = strval( val ); }
if( strcmp( key , "pKickboxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKickboxSkill] = strval( val ); }
if( strcmp( key , "pBich" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBich] = strval( val ); }
if( strcmp( key , "pBiched" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBiched] = strval( val ); }
if( strcmp( key , "lTimeadm" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][lTimeadm] = strval( val ); }
if( strcmp( key , "pGun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); }
if( strcmp( key , "pGun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); }
if( strcmp( key , "pGun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); }
if( strcmp( key , "pGun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); }
if( strcmp( key , "pAmmo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); }
if( strcmp( key , "pAmmo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
if( strcmp( key , "pAmmo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
if( strcmp( key , "pAmmo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = 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 , "pHospitalTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHospitalTime] = strval( val ); }
if( strcmp( key , "Idebil" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pIdebil] = strval( val ); }
if( strcmp( key , "Timerzakaz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTimerzakaz] = strval( val ); }
if( strcmp( key , "Timerzakazsik" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTimerzakazsik] = strval( val ); }
if( strcmp( key , "Timerzamena" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTimerzamena] = strval( val ); }
if( strcmp( key , "TimeVhod" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTimeVhod] = strval( val ); }
if( strcmp( key , "Premium" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPremium] = strval( val ); }
if( strcmp( key , "Areport", true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pAreport] = strval( val ); }
if( strcmp( key , "Aban", true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pAban] = strval( val ); }
if( strcmp( key , "Awarn", true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pAwarn] = strval( val ); }
if( strcmp( key , "Akick", true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pAkick] = strval( val ); }
}//end while
fclose(UserFile);//close the file after everything has been read in the while
}
else
{
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
new loginmsg[256+1];
format(loginmsg,256,"{FF0000}Вы ввели не верный пароль от акаунта.\
\n{33AAFF}Введите пароль ещё раз(%d) попытки.",gPlayerLogTries);
ShowPlayerDialog(playerid,1,3,"Пароль:",loginmsg,"Войти","Отмена");
if(gPlayerLogTries[playerid] == 4) { Kick(playerid); }
return true;
}
gPlayerLogged[playerid] = 1;
ResetPlayerMoney(playerid);
ConsumingMoney[playerid] = 1;
CurrentMoney[playerid] = PlayerInfo[playerid][pMoney];
PlayerInfo[playerid][pMoney] = GetMoney(playerid);
SetPlayerWantedLevel(playerid,PlayerInfo[playerid][pWanted]);
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 2;
PlayerInfo[playerid][pPos_x] = -124.6325;
PlayerInfo[playerid][pPos_y] = 981.1688;
PlayerInfo[playerid][pPos_z] = 12.1494;
PlayerInfo[playerid][pModel] = 0;
new randphone = 100000 + random(899900);//minimum 1000 max 9999 //giving one at the start
PlayerInfo[playerid][pPnumber] = randphone;
PlayerInfo[playerid][pPhousekey] = 255;
PlayerInfo[playerid][pMoney] = 2000000;
PlayerInfo[playerid][pCarLicA] = 2000000;
PlayerInfo[playerid][pCarLicB] = 2000000;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pReg] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "Мы рады что вы выбрали наш сервер.");
SendClientMessage(playerid, COLOR_YELLOW, "И специально для вас мы приготовили бонус.");
SendClientMessage(playerid, COLOR_YELLOW, "Для облегчение начала игры мы вам выдаем бонус.");
SendClientMessage(playerid, COLOR_YELLOW, "2 миллиона рублей , 2 лвл, и прова на категорий: A,B.");
SetPlayerHealth(playerid, 100);
}
new playername[32]; // Объявим переменную для записи ника
GetPlayerName(playerid, playername, sizeof(playername)); // узнаем ник подключившегося игрока
if(CheckTimeBanList(playername) > 0)
{
SendClientMessage(playerid,COLOR_ORANGE,"Ваш Акаунт был заблокирован на время администратором"); // отправим текст
SendClientMessage(playerid,COLOR_ORANGE,"Подробную Информацию связаную с блокировкой вашего акаунта вы");
SendClientMessage(playerid,COLOR_ORANGE,"можете узнать после подачи заявления на разбан");
SendClientMessage(playerid,COLOR_ORANGE,"Оставить свое заявление на разбан можно здесь vk.com/only_crc");
Kick(playerid); // кикнем
return true;
}
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid); // Мгновенное обновление полосы нужд (Использовать каждый раз после подключения либо вновь показывающего тексдрава)
//================================================================//
}
return true;
}