Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

[Помощь]Помогите Решить Проблему с Регистрацией/Авторизацией.

Статус
В этой теме нельзя размещать новые ответы.

Pastor

Умник
Всем доброго времени суток.
Дело в том что у меня в моде проблема с регистрацией/авторизацией.
Запускаю Сервер Регистрирую акаунт , и сразу выходит авторизация, но я могу написать любые цифры(буквы) и он зайдет в акаунт.
Так же после перезахода.

PHP:
enum pInfo
{
	pKey[32],
	pNoFree,
	pZapret,
	pVorSkill,
	pBancka,
	pFBancka,
	pFlatKey,
	pDalnoboiSkill,
	pBlockeds,
	pLevel,
	pWarns,
	pWanted,
	pNarcoZavisimost,
	pNarcoLomka,
	pForce,
	pAdmin,
	pDonateRank,
	gPupgrade,
	pConnectTime,
	pReg,
	pSex,
	pAge,
	pOrigin,
	pCK,
	pMuted,
	pExp,
	pCash,
	pAccount,
	pCrimes,
	pKills,
	pDeaths,
	pWantedDeaths,
	pLottoNr,
	pFishes,
	pBiggestFish,
	pJob,
	pPayCheck,
	pHeadValue,
	pJailed,
	pJailTime,
	pMats,
	pDrugs,
	pLeader,
	pMember,
	pFMember,
	pRank,
	pChar,
	pCar,
	pContractTime,
	pDetSkill,
	pDrochSkill,
	pLawSkill,
	pMechSkill,
	pJackSkill,
	pGromilaSkill,
	pCarSkill,
	pNewsSkill,
	pDrugsSkill,
	pCookSkill,
	pFishSkill,
Float:pHealth,
Float:pSHealth,
	pInt,
	pLocal,
	pTeam,
	pPhousekey,
	pPbiskey,
Float:pPos_x,
Float:pPos_y,
Float:pPos_z,
	pVirWorld,
	pCarLic,
	pMotoLic,
	pFlyLic,
	pBoatLic,
	pFishLic,
	pGunLic,
	pGun0,
	pGun1,
	pGun2,
	pGun3,
	pGun4,
	pGun5,
	pGun6,
	pGun7,
	pGun8,
	pGun9,
	pGun10,
	pGun11,
	pAmmo0,
	pAmmo1,
	pAmmo2,
	pAmmo3,
	pAmmo4,
	pAmmo5,
	pAmmo6,
	pAmmo7,
	pAmmo8,
	pAmmo9,
	pAmmo10,
	pAmmo11,
	pCarTime,
	pMusorTime,
	pCleanTime,
	pTruckTime,
	pPayDay,
	pPayDayHad,
	pLoses,
	pAlcoholPerk,
	pDrugPerk,
	pMiserPerk,
	pPainPerk,
	pTraderPerk,
	pTut,
	pFWarns,
	pAdjustable,
	pFuel,
	pMarried,
	pMarriedTo[128],
	pVirtualWorld,
	pMask,
	pClock,
	pDice,
	pRope,
	pGunSkill,
	pCard,
	pMutedTime,
	pRadio,
	pNeSdal,
	pLivingAt[128],
	pFirstName[128],
	pLastName[128],
	pBornAt[128],
PHP:
public OnPlayerRequestClass(playerid, classid)
{
	if(IsPlayerNPC(playerid))return true;// Подключение Ботов
	SetPlayerInterior(playerid,0);
    SetPlayerCameraPos(playerid,1521.4435,-1636.1875,24.5469);//камера при входе
    SetPlayerCameraLookAt(playerid,1452.7257,-1644.5986,14.0469);//камера при входе
	new loginmsg[400],loginname[MAX_PLAYER_NAME];
	GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
    if(gPlayerAccount[playerid] != 0)
	{
		format(loginmsg,sizeof(loginmsg),"{FFFFFF}   \n  Добро пожаловать на сервер YourWorld [RPG] [RUS/By/UA]\n\nНа сервере:\n» {ffdb58}183 {ffffff}дома\n» {ffdb58}23 {ffffff}бизнесов\n» {ffdb58}18 {ffffff}сбизнесов\n» {ffdb58}3 {ffffff}квартирных дома\n » {ffdb58}15 {ffffff}различных работ\n{ffffff}И многое другое!\n\n\tЭтот аккаунт {00C0FF}зарегестрирован{ffffff}!\n\nЛогин: {00C0FF}%s\n{ffffff}Введи пароль:",loginname);
		SPD(playerid,1,DIALOG_STYLE_INPUT,"Авторизация на YourWorld ",loginmsg," Войти "," Отмена ");
		return 1;
	}
	else
	{
  		format(loginmsg,sizeof(loginmsg),"{FFFFFF}   \n  Добро пожаловать на сервер YourWorld [RPG] [RUS/By/UA]\n\nНа сервере:\n» {ffdb58}183 {ffffff}дома\n» {ffdb58}23 {ffffff}бизнесов\n» {ffdb58}18 {ffffff}сбизнесов\n» {ffdb58}3 {ffffff}квартирных дома\n » {ffdb58}15 {ffffff}различных работ\n{ffffff}И многое другое!\n\n\tЭтот аккаунт {FF0000}не зарегестрирован{ffffff}!\n\nЛогин: {e3be88}%s\n{ffffff}Придумай себе пароль:",loginname);
		SPD(playerid,2,DIALOG_STYLE_INPUT,"Регистрация на YourWorld ",loginmsg,"Регистрация","Отмена");
	}
	return 1;
}
PHP:
public OnPlayerConnect(playerid)
{
	if(IsPlayerNPC(playerid))return true;
	PlayerOnJob[playerid] = false;
	PlayerStartJob[playerid] = false;
	GetPlayerMetall[playerid] = 0;
	AllPlayerMetall[playerid] = 0;
	GetPlayerMetallEx[playerid] = 0;
	AllPlayerMetallEx[playerid] = 0;
	ExtraMetall[playerid] = 0;
	PlayAudioStreamForPlayer(playerid,"http://cs6295.userapi.com/u123463111/docs/6eb5c31dea7d/by_nikitqa.mp3?dl=1");
	DmZona[playerid] = 0;
	MedicCP[playerid] = 0;
	gPlayerAccount[playerid] = 0;
	WrongPassword[playerid] = 0;
	Spawned[playerid] = 0;
	GunCheckTime[playerid] = 0;
	new PlName[MAX_PLAYER_NAME],count;
	GetPlayerName(playerid,PlName,sizeof(PlName));
	for(new i; i < strlen(PlName); i++)
	{
	    if (PlName[i] >= '0' && PlName[i] <= '9')
	    {
	        count++;
	        if(count >= 5)
	        {
	            SendClientMessage(playerid,COLOR_WHITE,"Регистрация подобных никнеймов {F42D2D}запрещена!");
	            Kick(playerid);
	            break;
	        }
	    }
	}
PHP:
stock OnPlayerLogin(playerid,password[])
{
	if(IsPlayerNPC(playerid))return 1;// Подключение Ботов
 	new string[64];// Масив с путём для файла
 	new pass[32];// Масив с паролем
 	new playername[MAX_PLAYER_NAME];// Масив для получения имени игрока
 	GetPlayerName(playerid, playername, sizeof(playername));// Получаем Имя игрока
 	format(string,sizeof(string), "players/%s.ini", playername);// Добавляем имя игрока, в путь для загрузки
 	new File = ini_openFile(string);// Открываем файл
 	ini_getString(File,"pKey",pass,32);// Загружаем пароль
  if(strcmp(pass,password,true) == 0)

	{
  WrongPassword[playerid]++;
		SendClientMessage(playerid, COLOR_WHITE, "{ffdb58}Пароль неверен! После третьей попытки вы будете кикнуты.");
		if(WrongPassword[playerid] == 3) return SendClientMessage(playerid, COLOR_WHITE, "{ffdb58}Вы были кикнуты. Причина:{ffffff} Не правильный ввод пароля с 3-го раза."), Kick(playerid);
		SPD(playerid,1,DIALOG_STYLE_INPUT,"Авторизация на YourWorld", "{ffdb58}Авторизируйтесь, введите свой пароль", " Далее "," Отмена ");
		return true;
 	}
 	else
	{
			ini_getInteger(File,"pLevel",PlayerInfo[playerid][pLevel]);
			ini_getInteger(File,"pBlockeds",PlayerInfo[playerid][pBlockeds]);
  			ini_getInteger(File,"pWarns",PlayerInfo[playerid][pWarns]);
    		ini_getInteger(File,"pAdmin",PlayerInfo[playerid][pAdmin]);
			ini_getInteger(File,"pWanted",PlayerInfo[playerid][pWanted]);
			ini_getInteger(File,"pVirWorld",PlayerInfo[playerid][pVirWorld]);
  			ini_getInteger(File,"pFlatKey",PlayerInfo[playerid][pFlatKey]);
    		ini_getInteger(File,"pForce",PlayerInfo[playerid][pForce]);
    		ini_getInteger(File,"pDonateRank",PlayerInfo[playerid][pDonateRank]);
			ini_getInteger(File,"gPupgrade",PlayerInfo[playerid][gPupgrade]);
  			ini_getInteger(File,"pConnectTime",PlayerInfo[playerid][pConnectTime]);
    		ini_getInteger(File,"pReg",PlayerInfo[playerid][pReg]);
    		ini_getInteger(File,"pSex",PlayerInfo[playerid][pSex]);
			ini_getInteger(File,"pAge",PlayerInfo[playerid][pAge]);
  			ini_getInteger(File,"pOrigin",PlayerInfo[playerid][pOrigin]);
    		ini_getInteger(File,"pNarcoZavisimost",PlayerInfo[playerid][pNarcoZavisimost]);
    		ini_getInteger(File,"pNarcoLomka",PlayerInfo[playerid][pNarcoLomka]);
			ini_getInteger(File,"pCK",PlayerInfo[playerid][pCK]);
  			ini_getInteger(File,"Bizz",PlayerInfo[playerid][pPbiskey]);
    		ini_getInteger(File,"AdminLevel",PlayerInfo[playerid][pAdmin]);
    		ini_getInteger(File,"pMuted",PlayerInfo[playerid][pMuted]);
			ini_getInteger(File,"pExp",PlayerInfo[playerid][pExp]);
  			ini_getInteger(File,"pCash",PlayerInfo[playerid][pCash]);
    		ini_getInteger(File,"pAccount",PlayerInfo[playerid][pAccount]);
			ini_getInteger(File,"pCrimes",PlayerInfo[playerid][pCrimes]);
			ini_getInteger(File,"pKills",PlayerInfo[playerid][pKills]);
			ini_getInteger(File,"pDeaths",PlayerInfo[playerid][pDeaths]);
			ini_getInteger(File,"pWantedDeaths",PlayerInfo[playerid][pWantedDeaths]);
			ini_getInteger(File,"pLottoNr",PlayerInfo[playerid][pLottoNr]);
			ini_getInteger(File,"pFishes",PlayerInfo[playerid][pFishes]);
			ini_getInteger(File,"pBiggestFish",PlayerInfo[playerid][pBiggestFish]);
			ini_getInteger(File,"pJob",PlayerInfo[playerid][pJob]);
			ini_getInteger(File,"pPayCheck",PlayerInfo[playerid][pPayCheck]);
			ini_getInteger(File,"pHeadValue",PlayerInfo[playerid][pHeadValue]);
			ini_getInteger(File,"pJailed",PlayerInfo[playerid][pJailed]);
			ini_getInteger(File,"pZapret",PlayerInfo[playerid][pZapret]);
			ini_getInteger(File,"pJailTime",PlayerInfo[playerid][pJailTime]);
			ini_getInteger(File,"pVorSkill",PlayerInfo[playerid][pVorSkill]);
			ini_getInteger(File,"pMats",PlayerInfo[playerid][pMats]);
			ini_getInteger(File,"pDrugs",PlayerInfo[playerid][pDrugs]);
			ini_getInteger(File,"ptMoney",PlayerInfo[playerid][ptMoney]);
			ini_getInteger(File,"ptDrugs",PlayerInfo[playerid][ptDrugs]);
			ini_getInteger(File,"ptMats",PlayerInfo[playerid][ptMats]);
			ini_getInteger(File,"pLeader",PlayerInfo[playerid][pLeader]);
			ini_getInteger(File,"pMember",PlayerInfo[playerid][pMember]);
			ini_getInteger(File,"pFMember",PlayerInfo[playerid][pFMember]);
            ini_getInteger(File,"pRank",PlayerInfo[playerid][pRank]);
            ini_getInteger(File,"pChar",PlayerInfo[playerid][pChar]);
            ini_getInteger(File,"pContractTime",PlayerInfo[playerid][pContractTime]);
            ini_getInteger(File,"pDetSkill",PlayerInfo[playerid][pDetSkill]);
            ini_getInteger(File,"pDrochSkill",PlayerInfo[playerid][pDrochSkill]);
            ini_getInteger(File,"pLawSkill",PlayerInfo[playerid][pLawSkill]);
            ini_getInteger(File,"pMechSkill",PlayerInfo[playerid][pMechSkill]);
            ini_getInteger(File,"pGunSkill",PlayerInfo[playerid][pGunSkill]);
            ini_getInteger(File,"pDalnoboiSkill",PlayerInfo[playerid][pDalnoboiSkill]);
            ini_getInteger(File,"pJackSkill",PlayerInfo[playerid][pJackSkill]);
            ini_getInteger(File,"pCarSkill",PlayerInfo[playerid][pCarSkill]);
            ini_getInteger(File,"pNewsSkill",PlayerInfo[playerid][pNewsSkill]);
            ini_getInteger(File,"pDrugsSkill",PlayerInfo[playerid][pDrugsSkill]);
            ini_getInteger(File,"pCookSkill",PlayerInfo[playerid][pCookSkill]);
            ini_getInteger(File,"pFishSkill",PlayerInfo[playerid][pFishSkill]);
            ini_getFloat(File,"pSHealth",PlayerInfo[playerid][pSHealth]);
            ini_getFloat(File,"pHealth",PlayerInfo[playerid][pHealth]);
			ini_getInteger(File,"pInt",PlayerInfo[playerid][pInt]);
            ini_getInteger(File,"pLocal",PlayerInfo[playerid][pLocal]);
            ini_getInteger(File,"pTeam",PlayerInfo[playerid][pTeam]);
            ini_getInteger(File,"pPhousekey",PlayerInfo[playerid][pPhousekey]);
            ini_getInteger(File,"pPbiskey",PlayerInfo[playerid][pPbiskey]);
            ini_getFloat(File,"pPos_x",PlayerInfo[playerid][pPos_x]);
            ini_getFloat(File,"pPos_y",PlayerInfo[playerid][pPos_y]);
            ini_getFloat(File,"pPos_z",PlayerInfo[playerid][pPos_z]);
            ini_getInteger(File,"pCarLic",PlayerInfo[playerid][pCarLic]);
            ini_getInteger(File,"pMotoLic",PlayerInfo[playerid][pMotoLic]);
            ini_getInteger(File,"pCar",PlayerInfo[playerid][pCar]);
            ini_getInteger(File,"pBancka",PlayerInfo[playerid][pBancka]);
            ini_getInteger(File,"pFBancka",PlayerInfo[playerid][pFBancka]);
            ini_getInteger(File,"pFlyLic",PlayerInfo[playerid][pFlyLic]);
            ini_getInteger(File,"pBoatLic",PlayerInfo[playerid][pBoatLic]);
            ini_getInteger(File,"pFishLic",PlayerInfo[playerid][pFishLic]);
            ini_getInteger(File,"pGunLic",PlayerInfo[playerid][pGunLic]);
            ini_getInteger(File,"pCarTime",PlayerInfo[playerid][pCarTime]);
            ini_getInteger(File,"pMusorTime",PlayerInfo[playerid][pMusorTime]);
            ini_getInteger(File,"pCleanTime",PlayerInfo[playerid][pCleanTime]);
		 	ini_getInteger(File,"pTruckTime",PlayerInfo[playerid][pTruckTime]);
            ini_getInteger(File,"pPayDay",PlayerInfo[playerid][pPayDay]);
            ini_getInteger(File,"pPayDayHad",PlayerInfo[playerid][pPayDayHad]);
            ini_getInteger(File,"pLoses",PlayerInfo[playerid][pLoses]);
            ini_getInteger(File,"pAlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
            ini_getInteger(File,"pDrugPerk",PlayerInfo[playerid][pDrugPerk]);
            ini_getInteger(File,"pMiserPerk",PlayerInfo[playerid][pMiserPerk]);
            ini_getInteger(File,"pPainPerk",PlayerInfo[playerid][pPainPerk]);
            ini_getInteger(File,"pTraderPerk",PlayerInfo[playerid][pTraderPerk]);
            ini_getInteger(File,"pTut",PlayerInfo[playerid][pTut]);
            ini_getInteger(File,"pAdjustable",PlayerInfo[playerid][pAdjustable]);
            ini_getInteger(File,"pFuel",PlayerInfo[playerid][pFuel]);
            ini_getInteger(File,"pMarried",PlayerInfo[playerid][pMarried]);
            ini_getInteger(File,"pMarriedTo",PlayerInfo[playerid][pMarriedTo]);
            ini_getInteger(File,"pCard",PlayerInfo[playerid][pCard]);
            ini_getInteger(File,"pClock",PlayerInfo[playerid][pClock]);
            ini_getInteger(File,"pDice",PlayerInfo[playerid][pDice]);
            ini_getInteger(File,"pMutedTime",PlayerInfo[playerid][pMutedTime]);
            ini_getInteger(File,"pRadio",PlayerInfo[playerid][pRadio]);
            ini_getInteger(File,"pRope",PlayerInfo[playerid][pRope]);
            ini_getInteger(File,"pNeSdal",PlayerInfo[playerid][pNeSdal]);
            ini_getInteger(File,"pHelper",PlayerInfo[playerid][pHelper]);
            ini_getInteger(File,"pRobTime",PlayerInfo[playerid][pRobTime]);
            ini_getInteger(File,"pHmed",PlayerInfo[playerid][pHmed]);
            ini_getInteger(File,"pVipTime",PlayerInfo[playerid][pVipTime]);
            ini_getInteger(File,"pRefMoney",PlayerInfo[playerid][pRefMoney]);
            ini_getInteger(File,"pReferal",PlayerInfo[playerid][pReferal]);
            ini_getInteger(File,"pRefText",PlayerInfo[playerid][pRefText]);
            ini_getInteger(File,"pTkMats",PlayerInfo[playerid][pTkMats]);
            ini_getInteger(File,"pTkDrugs",PlayerInfo[playerid][pTkDrugs]);
            ini_getInteger(File,"pGromilaSkill",PlayerInfo[playerid][pGromilaSkill]);
            ini_getInteger(File,"pRobKey",PlayerInfo[playerid][pRobKey]);
            ini_getInteger(File,"pMail",PlayerInfo[playerid][pMail]);
            ini_getInteger(File,"pIP",PlayerInfo[playerid][pIP]);
            ini_getString(File,"pOtherPass",PlayerInfo[playerid][pOtherPass],32);
            ini_getInteger(File,"pFs",PlayerInfo[playerid][pFs]);
			if(!strcmp(PlayerInfo[playerid][pOtherPass],"None",true))
			{
				new playername2[MAX_PLAYER_NAME];
				GetPlayerName(playerid, playername2, sizeof(playername2));
				PlayerInfo[playerid][pAdjustable] = 0;
				ConsumingMoney[playerid] = 1;
				CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
				PlayerInfo[playerid][pReg] = 1;
				if(PlayerInfo[playerid][pBlockeds] >= 3)
				{
					SendClientMessage(playerid,COLOR_WHITE,"Ваш аккаунт {ff0000}заблокирован{ffffff}. Так как уже у вас 3 блокировки.");
					Kick(playerid);
					return 0;
				}
				//------------------------------------------------------------------------------
				SendClientMessage(playerid, COLOR_WHITE,"Добро пожаловать на сервер {ffdb58}YourWorld [RPG].{ffffff} Приятной вам игры!");
				printf("%s has logged in.",playername2);
				new string2[60], tmp2[50];
				if(PlayerInfo[playerid][pDonateRank] == 1) SendClientMessage(playerid, COLOR_WHITE,"У тебя {F5DEB3}VIP Аккаунт 1 уровня{FFFFFF}");
				if(PlayerInfo[playerid][pDonateRank] == 2) SendClientMessage(playerid, COLOR_WHITE,"У тебя {F5DEB3}VIP Аккаунт 2 уровня{FFFFFF}");
				if(PlayerInfo[playerid][pHelper] >= 1 || PlayerInfo[playerid][pAdmin] > 0)  {
					if(PlayerInfo[playerid][pHelper] >= 1) format(string2, sizeof(string2), "Вы вошли как {F5DEB3}Хелпер %d-го уровня.",PlayerInfo[playerid][pHelper]);
					if(PlayerInfo[playerid][pAdmin] == 1) format(string2, sizeof(string2), "Вы вошли как {F5DEB3}Модератор %d-го уровня.",PlayerInfo[playerid][pAdmin]);
					if(PlayerInfo[playerid][pAdmin] == 2) format(string2, sizeof(string2), "Вы вошли как {F5DEB3}Модератор %d-го уровня.",PlayerInfo[playerid][pAdmin]);
					if(PlayerInfo[playerid][pAdmin] == 3) format(string2, sizeof(string2), "Вы вошли как {F5DEB3}Модератор %d-го уровня.",PlayerInfo[playerid][pAdmin]);
					if(PlayerInfo[playerid][pAdmin] == 4) format(string2, sizeof(string2), "Вы вошли как {F5DEB3}Модератор 4-го уровня.",PlayerInfo[playerid][pAdmin]);
					if(PlayerInfo[playerid][pAdmin] == 5) format(string2, sizeof(string2), "Вы вошли как {F5DEB3}Гл.Модератор.",PlayerInfo[playerid][pAdmin]);
					if(PlayerInfo[playerid][pAdmin] == 6) format(string2, sizeof(string2), "Вы вошли как {F5DEB3}Гл. Администратор.",PlayerInfo[playerid][pAdmin]);
					SendClientMessage(playerid, COLOR_WHITE,string2);	}
				gPlayerLogged[playerid] = 1;
				SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pChar], 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];
				format(tmp2, sizeof(tmp2), "~w~ѓO—PO ЊO„A‡O‹A¦’ ~n~~y~   %s", playername2);
				GameTextForPlayer(playerid, tmp2, 5000, 1);
				for(new i = GetMaxPlayers() - 1; i != -1; i--)
				{
					if(!IsPlayerConnected(i)) continue;
					if(PlayerInfo[i][pMask] == 1) ShowPlayerNameTagForPlayer(playerid, i, 0);
				}
				Spawned[playerid] = 1;
				SpawnPlayer(playerid);
				SetCameraBehindPlayer(playerid);
			}
			else SPD(playerid, 351, 1, "Безопасность", "{ffdb58}Введите ваш дополнительный пароль:", "Принять", "Отмена");
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				AddVehicleComponent (hCar[i], HouseInfo[i][hKoleso]);
				AddVehicleComponent (hCar[i], HouseInfo[i][hBamper]);
				AddVehicleComponent (hCar[i], HouseInfo[i][hBamper2]);
				ChangeVehiclePaintjob(hCar[i], HouseInfo[i][hPaintjob]);
				AddVehicleComponent (hCar[i], HouseInfo[i][hNitro]);
				AddVehicleComponent (hCar[i], HouseInfo[i][hGidravlika]);
			}
		}
	return true;
}
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу