Рекомендованные сообщения



3 posts in this topic

Доброго времени суток возникла проблема с модом аризоны,а именно:

Когда человек зашел 1 раз зарегестрировался всё нормально но при перезаходе после ввода пороля он просто висит в воздухе его не спавнит,пробовал много вариантов но проблему не удалось решить вот решил обратится к вам,может вы что подскажете.

Вот скриншот: 

Спойлер

5NJjtlvFwSU.jpg

 

OnPlayerLoginMysql

Спойлер

publics OnPlayerLoginMysql(playerid)
{
	new string[2100], style, name[60], pass[70];
	AntiCheatsOFF(playerid, 2);
	PlayerInfo[playerid][pID] = cache_get_row_int(0, 0, mysql); //ID 1
	cache_get_row(0, 1, name, mysql); //NickName2
	cache_get_row(0, 2, pass, mysql); //Password3
	cache_get_row(0, 3, PlayerRegIP[playerid], mysql,16); //RegIP4
	cache_get_row(0, 4, PlayerIp[playerid], mysql,16); //OldIP5
	cache_get_row(0, 5, PlayerCheckIP1[playerid], mysql,16); //CheckIP6
	cache_get_row(0, 6, PlayerCheckIP2[playerid],  mysql,16);//CheckIP7
	cache_get_row(0, 7, PlayerReferal[playerid],  mysql,24);//Referal8
	cache_get_row(0, 8, PlayerMail[playerid], mysql,50); //Mail9
	cache_get_row(0, 9, PlayerTelephone[playerid], mysql,20); //Telephone0
	cache_get_row(0, 10, PlayerFName[playerid], mysql,30); //Name1

	PlayerInfo[playerid][pLevel] = cache_get_row_int(0, 11, mysql); //Level2
	PlayerInfo[playerid][pExp] = cache_get_row_int(0, 12, mysql); //Exp3
	PlayerInfo[playerid][pPlayHours] = cache_get_row_int(0, 13, mysql); //PlayHours4
	PlayerInfo[playerid][pSex] = cache_get_row_int(0, 14, mysql); //Sex5
	PlayerInfo[playerid][pAge] = cache_get_row_int(0, 15, mysql); //Age6
	PlayerInfo[playerid][pRace] = cache_get_row_int(0, 16, mysql); //Rce7
	PlayerInfo[playerid][pAdmin] = cache_get_row_int(0, 17, mysql); //Admin8
	PlayerInfo[playerid][pHelper] = cache_get_row_int(0, 18, mysql); //Helper <= hec  19
	PlayerInfo[playerid][pMoney] = cache_get_row_int(0, 19, mysql); //Money
	PlayerInfo[playerid][pBank] = cache_get_row_int(0, 20, mysql); //Bank
	PlayerInfo[playerid][pWanted] = cache_get_row_int(0, 21, mysql); //Wanted
	PlayerInfo[playerid][pVIP] = cache_get_row_int(0, 22, mysql); //VIP
	PlayerInfo[playerid][pLeader] = cache_get_row_int(0, 23, mysql); //Leader
	PlayerInfo[playerid][pMember] = cache_get_row_int(0, 24, mysql); //Member
	PlayerInfo[playerid][pRank] = cache_get_row_int(0, 25, mysql); //Rank
	PlayerInfo[playerid][pGunLic] = cache_get_row_int(0, 26, mysql); //GunLic
	PlayerInfo[playerid][pBoatLic] = cache_get_row_int(0, 27, mysql); //BoatLic
	PlayerInfo[playerid][pFishLic] = cache_get_row_int(0, 28, mysql); //FishLic
	PlayerInfo[playerid][pFlyLic] = cache_get_row_int(0, 29, mysql); //FlyLic
	PlayerInfo[playerid][pCarLic] = cache_get_row_int(0, 30, mysql); //CarLic
	PlayerInfo[playerid][pBikeLic] = cache_get_row_int(0, 31,mysql); //BikeLic
	PlayerInfo[playerid][pD_Packets] = cache_get_row_int(0, 32, mysql); //D_Packets
	PlayerInfo[playerid][pWarns] = cache_get_row_int(0, 33, mysql); //Warns
	PlayerInfo[playerid][pPayDay] = cache_get_row_int(0, 34, mysql); //PayDay
	PlayerInfo[playerid][pHouseKey] = cache_get_row_int(0, 35, mysql); //HouseKey
	PlayerInfo[playerid][pBizKey] = cache_get_row_int(0, 36, mysql); //BizKey
	PlayerInfo[playerid][pFWarns] = cache_get_row_int(0, 37, mysql); //FWarns
	PlayerInfo[playerid][pSkin] = cache_get_row_int(0, 38, mysql); //Skin
	PlayerInfo[playerid][pTelNum] = cache_get_row_int(0, 39, mysql); //TelNum
	PlayerInfo[playerid][pPhone] = cache_get_row_int(0, 40, mysql); //Phone
	PlayerInfo[playerid][pMats] = cache_get_row_int(0, 41, mysql); //Mats
	PlayerInfo[playerid][pPackets] = cache_get_row_int(0, 42, mysql); //Packets
	PlayerInfo[playerid][pDrugs] = cache_get_row_int(0, 43, mysql); //Drugs
	PlayerInfo[playerid][pJob] = cache_get_row_int(0, 44, mysql); //Job
	PlayerInfo[playerid][pMuteTime] = cache_get_row_int(0, 45, mysql); //MuteTime
	PlayerInfo[playerid][pFMuteTime] = cache_get_row_int(0, 46, mysql); //FMuteTime
	PlayerInfo[playerid][pJailTime] = cache_get_row_int(0, 47, mysql); //JailTime
	PlayerInfo[playerid][pBailPrice] = cache_get_row_int(0, 48, mysql); //BailPrice
	PlayerInfo[playerid][pKungfu] = cache_get_row_int(0, 49, mysql); //KungfuStyle
	PlayerInfo[playerid][pKneehead] = cache_get_row_int(0, 50, mysql); //KneeheadStyle
	PlayerInfo[playerid][pBoxing] = cache_get_row_int(0, 51, mysql); //BoxingStyle
	PlayerInfo[playerid][pElbow] = cache_get_row_int(0, 52, mysql); //ElbowStyle
	style = cache_get_row_int(0, 53, mysql); //Style
	PlayerInfo[playerid][pSpawned] = cache_get_row_int(0, 54, mysql); //Spawned
	NeSdal[playerid] = cache_get_row_int(0, 55, mysql); //NeSdal
	PlayerInfo[playerid][pDCTime] = cache_get_row_int(0, 56, mysql); //DropCarTime
	PlayerDrunkLevel[playerid] = cache_get_row_int(0, 57, mysql); //Drunk
	PlayerInfo[playerid][pSpining] = cache_get_row_int(0, 58, mysql); //Spining
	PlayerInfo[playerid][pWorms] = cache_get_row_int(0, 59, mysql); //Worms
	PlayerInfo[playerid][pLotto] = cache_get_row_int(0, 60, mysql); //Lotto
	PlayerInfo[playerid][pMask] = cache_get_row_int(0, 61, mysql); //Mask
	PlayerInfo[playerid][pRoliki] = cache_get_row_int(0, 62, mysql); //Roliki
	PlayerInfo[playerid][pFuel] = cache_get_row_int(0, 63, mysql); //Fuel
	PlayerInfo[playerid][pPhoneBook] = cache_get_row_int(0, 64, mysql); //PhoneBook
	PlayerInfo[playerid][pPistol_Skill] = cache_get_row_int(0, 65, mysql); //Pistol_Skill
	PlayerInfo[playerid][pSDPistol_Skill] = cache_get_row_int(0, 66, mysql); //SDPistol_Skill
	PlayerInfo[playerid][pEagle_Skill] = cache_get_row_int(0, 67, mysql); //Eagle_Skill
	PlayerInfo[playerid][pShotGun_Skill] = cache_get_row_int(0, 68, mysql); //ShotGun_Skill
	PlayerInfo[playerid][pUZI_Skill] = cache_get_row_int(0, 69, mysql); //UZI_Skill
	PlayerInfo[playerid][pMP5_Skill] = cache_get_row_int(0, 70, mysql); //MP5_Skill
	PlayerInfo[playerid][pAK47_Skill] = cache_get_row_int(0, 71, mysql); //AK47_Skill
	PlayerInfo[playerid][pM4_Skill] = cache_get_row_int(0, 72, mysql); //M4_Skill
	PlayerInfo[playerid][pSniper_Skill] = cache_get_row_int(0, 73, mysql); //Sniper_Skill
	PlayerInfo[playerid][pGlasses] = cache_get_row_int(0, 74, mysql); //Glasses
	PlayerInfo[playerid][pBandans] = cache_get_row_int(0, 75, mysql); //Bandans
	PlayerInfo[playerid][pHats] = cache_get_row_int(0, 76, mysql); //Hats
	IncReset[playerid] = cache_get_row_int(0, 77, mysql); //IncReset
	PlayerInfo[playerid][pSyringe] = cache_get_row_int(0, 78, mysql); //Syringe
	PlayerInfo[playerid][pPoison] = cache_get_row_int(0, 79, mysql); //Poison
	PlayerInfo[playerid][pSigs] = cache_get_row_int(0, 80, mysql); //Smokes
	PlayerInfo[playerid][pLighter] = cache_get_row_int(0, 81, mysql); //Lighter
	PlayerInfo[playerid][pFrom] = cache_get_row_int(0, 82, mysql); //From
	PlayerInfo[playerid][pBL] = cache_get_row_int(0, 83, mysql); //BlackList
	PlayerInfo[playerid][pOOC] = cache_get_row_int(0, 84, mysql); //OOC
	PlayerInfo[playerid][pZKP] = cache_get_row_int(0, 85, mysql); //ZKP
	CarPoundTime[playerid] = cache_get_row_int(0, 86, mysql); //CarPoundTime
	PlayerInfo[playerid][pHeal] = cache_get_row_int(0, 87, mysql); //Heal
	Fullness[playerid] = cache_get_row_int(0, 88, mysql); //Fullness
	PlayerInfo[playerid][pPack] = cache_get_row_int(0, 89, mysql); //Pack
	PlayerInfo[playerid][pSprunks] = cache_get_row_int(0, 90, mysql); //Sprunks
	PlayerInfo[playerid][pCheepses] = cache_get_row_int(0, 91, mysql); //Cheeps
	PlayerInfo[playerid][pRadio] = cache_get_row_int(0, 92, mysql); //Radio
	TruckReset[playerid] = cache_get_row_int(0, 93, mysql); //TruckReset
	PlayerInfo[playerid][pSnow] = cache_get_row_int(0, 94, mysql); //Snow
	PlayerInfo[playerid][pVirMoney] = cache_get_row_int(0, 95, mysql); //VirMoney
	PlayerInfo[playerid][pOldRepl] = cache_get_row_int(0, 96, mysql); //OldRepl
	PlayerInfo[playerid][pAllRepl] = cache_get_row_int(0, 97, mysql); //AllRepl
	PlayerInfo[playerid][pGetBonus] = cache_get_row_int(0, 98, mysql); //GetBonus
	PlayerInfo[playerid][pKey] = cache_get_row_int(0, 99, mysql); //Key
	PlayerInfo[playerid][pKeyCheck] = cache_get_row_int(0, 100, mysql); //KeyCheck
	PlayerInfo[playerid][pStatsStyle] = cache_get_row_int(0, 101, mysql); //StatsStyle
	PlayerInfo[playerid][pCredit] = cache_get_row_int(0, 102, mysql); //Credit
	PlayerInfo[playerid][pEnterKey] = cache_get_row_int(0, 103, mysql); //EnterKey
	PlayerInfo[playerid][pView] = cache_get_row_int(0, 105, mysql);  //View
	PlayerInfo[playerid][pFeFinder] = cache_get_row_int(0, 106, mysql); //FeFinder
	PlayerInfo[playerid][pGold] = cache_get_row_int(0, 107, mysql); //Gold
	PlayerInfo[playerid][pRepBan] = cache_get_row_int(0, 108, mysql);
	PlayerInfo[playerid][pArmours] = cache_get_row_int(0, 109, mysql);
	PlayerInfo[playerid][pClip] = cache_get_row_int(0, 110, mysql);
	PlayerInfo[playerid][pContractTime] = cache_get_row_int(0, 111, mysql);
	ResetGunsUP[playerid] = cache_get_row_int(0, 112, mysql);
	ResetBuyGuns[playerid] = cache_get_row_int(0, 113, mysql);
	PlayerInfo[playerid][pRPTest] = cache_get_row_int(0, 114, mysql);
	PlayerInfo[playerid][pEnergy] = cache_get_row_int(0, 115, mysql);
	PlayerInfo[playerid][pRepPack] = cache_get_row_int(0, 116, mysql);

	new weaponsstr[500];
	/* Проверить полную поочерёдность бд*/
	PlayerInfo[playerid][pF_Skill] = cache_get_row_int(0, 117, mysql);
	PlayerInfo[playerid][pP_Skill] = cache_get_row_int(0, 118, mysql);// переписать
	PlayerInfo[playerid][pZ_Skill] = cache_get_row_int(0, 119, mysql);
	PlayerInfo[playerid][pZa_Skill] = cache_get_row_int(0, 120, mysql);
	PlayerInfo[playerid][pIn_Skill] = cache_get_row_int(0, 121, mysql);// переписать
	PlayerInfo[playerid][pMy_Skill] = cache_get_row_int(0, 122, mysql);
	PlayerInfo[playerid][pBy_Skill] = cache_get_row_int(0, 123, mysql);
	PlayerInfo[playerid][pVipTime] = cache_get_row_int(0, 125, mysql);
	cache_get_row(0, 126, PlayerInfo[playerid][pMerrit],mysql, 25);
	PlayerInfo[playerid][pSprunk] = cache_get_row_int(0, 127, mysql);
	PlayerInfo[playerid][pBeer] = cache_get_row_int(0, 128, mysql); // переписать
	PlayerInfo[playerid][pShowCase] = cache_get_row_int(0, 129, mysql);
	cache_get_row(0, 130, PlayerInfo[playerid][pLastIP],mysql, 25);
	cache_get_row(0, 131, PlayerInfo[playerid][pLastLogin],mysql, 45);
	PlayerInfo[playerid][pHavePassword] = cache_get_row_int(0, 132, mysql);
	PlayerInfo[playerid][pHealth] = cache_get_row_int(0, 133, mysql);
	PlayerInfo[playerid][pWalentin] = cache_get_row_int(0, 134, mysql);// переписать
	PlayerInfo[playerid][pBuyWalent] = cache_get_row_int(0, 135, mysql);
	PlayerInfo[playerid][pTimeToLastWarn] = cache_get_row_int(0, 136, mysql);
	PlayerInfo[playerid][pHospital] = cache_get_row_int(0, 137, mysql);
	PlayerInfo[playerid][pSlotItem][0] = cache_get_row_int(0, 138, mysql);
	PlayerInfo[playerid][pSlotItem][1] = cache_get_row_int(0, 139, mysql);
	PlayerInfo[playerid][pSlotItem][2] = cache_get_row_int(0, 140, mysql);
	PlayerInfo[playerid][pSlotItem][3] = cache_get_row_int(0, 141, mysql);
	PlayerInfo[playerid][pSlotItem][4] = cache_get_row_int(0, 142, mysql);// переписать
	PlayerInfo[playerid][pSlotItem][5] = cache_get_row_int(0, 143, mysql);
	PlayerInfo[playerid][pRedio] = cache_get_row_int(0, 144, mysql);
	PlayerInfo[playerid][pMore] = cache_get_row_int(0, 145, mysql);
	PlayerInfo[playerid][pCheeps] = cache_get_row_int(0, 146, mysql);// переписать
	PlayerInfo[playerid][pAmountSex] = cache_get_row_int(0, 148, mysql);
	PlayerInfo[playerid][pDisease] = cache_get_row_int(0, 149, mysql);
	PlayerInfo[playerid][pWhore] = cache_get_row_int(0, 150, mysql);
	PlayerInfo[playerid][pMesh] = cache_get_row_int(0, 151, mysql);
 	PlayerInfo[playerid][FamilyID] = cache_get_row_int(0, 152, mysql);
    PlayerInfo[playerid][FamilyMute] = cache_get_row_int(0, 153, mysql);
    PlayerInfo[playerid][pReputation] = cache_get_row_int(0, 154, mysql);
    PlayerInfo[playerid][pLoadTextures] = cache_get_row_int(0, 155, mysql);
	PlayerInfo[playerid][pFamTalon] = cache_get_row_int(0, 156, mysql); //FamTalon

	GetPlayerIp(playerid,PlayerIp[playerid],16);

	new idx;
	_ResetGun(playerid);
	for(new x; x < 13; x ++)
	{
		PlayerInfo[playerid][pGuns][x] = strval(strtok(weaponsstr, idx));
		PlayerInfo[playerid][pAmmos][x] = strval(strtok(weaponsstr, idx));
		//_GiveGun(playerid, PlayerInfo[playerid][pGuns][x], PlayerInfo[playerid][pAmmos][x]);
	}
	format(string,sizeof(string),"UPDATE `accounts` SET `OldIP` = '%s',`Online_status`='1001' WHERE `ID` = '%i'",PlayerIp[playerid],PlayerInfo[playerid][pID]);
	mysql_tquery(mysql, string);


	IsPlayerLogged[playerid] = true;
	if(!IsARPName(Name(playerid)) && RP_Names) ShowPlayerDialogEx(playerid,RENAME_DIALOG,1,"Введите новый ник","{FFFFFF}Ваш ник не соответствует правилам сервера\nВведите новый ник в окошко и нажмите {9ACD32}Далее\nПример: {9ACD32}Carl_Johnson","Далее","");
	SetPlayerScore(playerid,PlayerInfo[playerid][pLevel]);
	GivePlayerMoney(playerid,PlayerInfo[playerid][pMoney]);
	if(PlayerInfo[playerid][pHealth]>5) J_SetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
	else J_SetPlayerHealth(playerid,20);
	OnLoadPass(playerid);
	Loadonlineinfo(playerid);
	GetNumberCars(playerid,PlayerInfo[playerid][pCars]);
	SetPlayerFightingStyle(playerid,style);
	if(TeamDuty[playerid])J_SetPlayerColor(playerid,TeamColors[GetTeamID(playerid)]);
	else J_SetPlayerColor(playerid,0xFDFCFC15);
	if(IsAtGang(playerid) || IsAtMafia(playerid)) J_SetPlayerColor(playerid,TeamColors[GetTeamID(playerid)]);
	if(PlayerInfo[playerid][pLeader] > 0)
	{
		if(!GetString(OrgInfo[PlayerInfo[playerid][pLeader]][oLeader], Name(playerid)))
		{
			if(IsACop(playerid))
			{
				if(UsingShield[playerid])RemovePlayerAttachedObject(playerid, 7);
				PlayerInfo[playerid][pShield] = 0.0;
			}
			PlayerInfo[playerid][pLeader] = 0;
			PlayerInfo[playerid][pMember] = 0;
			SendClientMessage(playerid,COLOR_WHITE,">> {FFCC99} Местом спавна автоматически назначен ЖД Вокзал. Изменить место спавна >> /setspawn!");
			PlayerInfo[playerid][pDCTime]=0;
			PlayerInfo[playerid][pRank] = 0;
			SetBumSkin(playerid);
			SendClientMessage(playerid, COLOR_GREY, "Вы были сняты с поста лидера");
		}
	}

	new query[150];
	format(query,150, "SELECT * FROM `questsprogress` WHERE `name`='%s' ORDER BY `idquest`;", PN(playerid));
	mysql_tquery(mysql, query, "LoadQuestMysql", "d", playerid);

	format(string, sizeof(string), "~w~Welcome ~n~~b~ %s",Name(playerid));
	GameTextForPlayer(playerid, string, 5000, 1);
	if(PlayerInfo[playerid][pLeader]!=0 || (PlayerInfo[playerid][pAdmin]!=0 && PlayerInfo[playerid][pAdmin]<5))
	{
		format(string,sizeof(string),"Игрок/админ %s[%d] зашел [reg ip:%s] -- [norm ip: %s]",PN(playerid),playerid,PlayerRegIP[playerid],PlayerIp[playerid]);
		SendAdminsMessage(0xCC0000FF,string);
	}
// 	DestroyVehicle(bulletlogin1);
	if(PlayerInfo[playerid][pBuyWalent]>1)Hunger(playerid,0);
	SendClientMessage(playerid,COLOR_WHITE,"{DFCFCF}[Подсказка]{DC4747} Используйте команду /menu и /gps для управлениям игровым персонажем.");
	SendClientMessage(playerid,COLOR_WHITE,"{DFCFCF}[Подсказка]{DC4747} Вы можете задать вопрос в нашу техническу поддержку /report");
	SendClientMessage(playerid,COLOR_WHITE,"{DFCFCF}[Подсказка]{DC4747} Советуем получить паспорт, а затем отправится на ферму или завод для заработка денег на права.");
	if(strcmp("No Mail Adress", PlayerMail[playerid], true)==0) SendClientMessage(playerid,COLOR_WHITE,"{DFCFCF}[Подсказка]{8F1E1E} У вас не привязан e-mail адрес. Привяжите его дабы подтвердить ваш аккаунт /mm - Настройки - e-mail.");


	if(PlayerInfo[playerid][pHouseKey]!=-1)
	{
		new bool: on=false;
		new s = GetHouseStyle(PlayerInfo[playerid][pHouseKey]);//тип дома
		for(new i;i < HouseRooms[s];i ++)// перебираеться количество комнат
		{
			if(GetString(HRoomOwner[PlayerInfo[playerid][pHouseKey]][i],Name(playerid)))//возвращает комнаты
			{
				on = true;
				break;
			}
		}
		if (on == false && !GetString(HouseInfo[PlayerInfo[playerid][pHouseKey]][hOwner],PN(playerid))) PlayerInfo[playerid][pHouseKey] = -1;
	}

	for(new houseid;houseid< OWNABLEHOUSES;houseid++)
	{
		if(GetString(HouseInfo[houseid][hOwner],PN(playerid)) && PlayerInfo[playerid][pHouseKey]==-1) PlayerInfo[playerid][pHouseKey]=houseid;
	}
	if(PlayerInfo[playerid][pRank]>0 && PlayerInfo[playerid][pMember]==0)PlayerInfo[playerid][pRank]=0;
	if(PlayerInfo[playerid][pFrom]!=-1 && !GetString(HotelInfo[PlayerInfo[playerid][pFrom]][htOwner],Name(playerid))) PlayerInfo[playerid][pFrom]=-1;
	//////////
	if(PlayerInfo[playerid][pCredit]>200000)
	{
		format(string,sizeof(string),"Долг центральному банку штата составляет: %d$. Оплатите кредит во избежание блокировки аккаунта.",PlayerInfo[playerid][pCredit]);
		SendClientMessage(playerid,COLOR_ACHAT,string);
		format(string,sizeof(string),"[A] %s[%d] зашел в игру. На данный момент у него задолженность в банке %d$",PN(playerid),playerid,PlayerInfo[playerid][pCredit]);
		SendAdminsMessage(COLOR_ORANGE,string);
		OrgInfo[TEAM_BANK][oBank]+=100000;
		SaveOrg(TEAM_BANK);
	}
	if(PlayerInfo[playerid][pWarns]>0)
	{
		PlayerInfo[playerid][pMember]=0;
		PlayerInfo[playerid][pLeader]=0;
		PlayerInfo[playerid][pRank]=0;
		if(PlayerInfo[playerid][pDCTime] ==3)PlayerInfo[playerid][pDCTime]=0;
	}
	if(PlayerInfo[playerid][pWarns]>2)
	{
		SendClientMessage(playerid,COLOR_GREEN,"Ваш аккаунт заблокирован!");
		PlayerInfo[playerid][pWarns]=0;
		BanPlayer(playerid);
	}
	switch(PlayerInfo[playerid][pDCTime])
	{
	case 1: if(PlayerInfo[playerid][pOOC]==-1) PlayerInfo[playerid][pDCTime]=0;
	case 2: if(PlayerInfo[playerid][pHouseKey]==-1) PlayerInfo[playerid][pDCTime]=0;
	case 3: if(PlayerInfo[playerid][pMember]==0) PlayerInfo[playerid][pDCTime]=0;
	}
	PlayerSpawn(playerid);
	if(PlayerInfo[playerid][pRace]>1) PlayerInfo[playerid][pRace]=1;
	NoEnterPickup[playerid]=6;


	for(new i = 0;i < OWNABLECARS;i ++)
	{
		new number = OwnableCar[i];
		if(IsPlayerHaveCar(playerid,number))
		{
			if(GetVehicleVirtualWorld(number)!=0)
			{
				SetVehicleToRespawn(number);
				SetVehicleVirtualWorld(number,0);
			}
			if(PlayerInfo[playerid][pCredit]>300000)
			{
				SendClientMessage(playerid,COLOR_GREY,"За неоплату кредита, Центральный банк изьял у вас автомобиль!");
				PlayerInfo[playerid][pCredit]=0;
				SellCar(number);
				GetNumberCars(playerid,PlayerInfo[playerid][pCars]);
			}
		}
	}
	if(QuestProgress[playerid][15]>100)QuestProgress[playerid][15]=100;
	//////////
	if(!GetString(PlayerInfo[playerid][pLastIP],"The State") && !GetString(PlayerInfo[playerid][pLastLogin],"The State"))
	{
		/////////////////
		IpTextDraw[playerid][0] = CreatePlayerTextDraw(playerid,40.000000, 285.000000, PlayerInfo[playerid][pLastIP]);
		PlayerTextDrawBackgroundColor(playerid,IpTextDraw[playerid][0], 255);
		PlayerTextDrawFont(playerid,IpTextDraw[playerid][0], 1);
		PlayerTextDrawLetterSize(playerid,IpTextDraw[playerid][0], 0.240000, 1.500000);
		PlayerTextDrawColor(playerid,IpTextDraw[playerid][0], -1);
		PlayerTextDrawSetOutline(playerid,IpTextDraw[playerid][0], 0);
		PlayerTextDrawSetProportional(playerid,IpTextDraw[playerid][0], 1);
		PlayerTextDrawSetShadow(playerid,IpTextDraw[playerid][0], 1);
		PlayerTextDrawSetSelectable(playerid,IpTextDraw[playerid][0], 0);

		IpTextDraw[playerid][1] = CreatePlayerTextDraw(playerid,40.000000, 297.000000, PlayerInfo[playerid][pLastLogin]);
		PlayerTextDrawBackgroundColor(playerid,IpTextDraw[playerid][1], 255);
		PlayerTextDrawFont(playerid,IpTextDraw[playerid][1], 1);
		PlayerTextDrawLetterSize(playerid,IpTextDraw[playerid][1], 0.240000, 1.500000);
		PlayerTextDrawColor(playerid,IpTextDraw[playerid][1], -1);
		PlayerTextDrawSetOutline(playerid,IpTextDraw[playerid][1], 0);
		PlayerTextDrawSetProportional(playerid,IpTextDraw[playerid][1], 1);
		PlayerTextDrawSetShadow(playerid,IpTextDraw[playerid][1], 1);
		PlayerTextDrawSetSelectable(playerid,IpTextDraw[playerid][1], 0);
		///////////////
		ShowIpTime[playerid]=120;
		PlayerInfo[playerid][pShowIper]=1;
	}
	/////////////
	new newstring[90],iplast[24];
	GetPlayerIp(playerid,iplast,16);
	format(newstring,sizeof(newstring),"%s",iplast);//lastip
	SetString(PlayerInfo[playerid][pLastIP],newstring);

	new Year, Month, Day;
	getdate(Year, Month, Day);

	new Hour, Mon, Sec;
	gettime(Hour,Mon,Sec);

	format(newstring,sizeof(newstring),"%d.%d.%d - %d:%d:%d",Day,Month,Year, Hour, Mon,Sec);
	SetString(PlayerInfo[playerid][pLastLogin],newstring);
	////////////////
	CreatePlayerMapDraws(playerid);
	///////////
	if(PlayerInfo[playerid][FamilyID] != -1)
	{
		mysql_format(mysql, query, sizeof(query), "SELECT * FROM `family` WHERE `ID` = '%d'", PlayerInfo[playerid][FamilyID]);
		mysql_tquery(mysql, query, "MysqlLoadFamily", "d", playerid);
	}
	if(!ActualVIP(playerid))
	{
		if(PlayerInfo[playerid][pVIP]>0)
		{
			if(PlayerInfo[playerid][pVIP]>1)
			{
				SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Важно] {FFFFFF}Срок вашего VIP аккаунта истек, уровень VIP понижен и продлен!");
				PlayerInfo[playerid][pVipTime] = gettime()+(30*24*60*60);

			}
			else if(PlayerInfo[playerid][pVIP]==1) SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Важно] {FFFFFF}Срок вашего VIP аккаунта истек, уровень VIP был снят.");
			PlayerInfo[playerid][pVIP]--;
		}


	}
	PlayerSpawn(playerid);
	SpawnPlayer(playerid);
	return true;
}

 

PlayerSpawn

Спойлер

public PlayerSpawn(playerid)
{
	if(IsPlayerNPC(playerid))return true;
	if(IsPlayerInAnyVehicle(playerid))
	{
		new Float:X,Float:Y,Float:Z;
		GetPlayerPos(playerid,X,Y,Z);
		pTemp[playerid][pAntiAir] += 6;
		J_SetPlayerPos(playerid,X,Y,Z);
		SetTimerEx("PlayerSpawn", 50, false, "i", playerid);
		return true;
	}
	SettingSpawn(playerid);
	AntiCheatsOFF(playerid, 2);
	if(pTemp[playerid][SPECTPLAYER]==true)SpecPl(playerid, false);
	else SpawnPlayer(playerid);
	time_lspawn = gettime();
	return true;
}

 

 

Share this post


Link to post
Share on other sites

методом тыка нашел что проблема в этом :

заспавнило когда убрал этот кусок кода 

Спойлер

	if(PlayerInfo[playerid][pHouseKey]!=-1)
	{
		new bool: on=false;
		new s = GetHouseStyle(PlayerInfo[playerid][pHouseKey]);//тип дома
		for(new i;i < HouseRooms[s];i ++)// перебираеться количество комнат
		{
			if(GetString(HRoomOwner[PlayerInfo[playerid][pHouseKey]][i],Name(playerid)))//возвращает комнаты
			{
				on = true;
				break;
			}
		}
		if (on == false && !GetString(HouseInfo[PlayerInfo[playerid][pHouseKey]][hOwner],PN(playerid))) PlayerInfo[playerid][pHouseKey] = -1;
	}

 

 

Edited by edikzver

Share this post


Link to post
Share on other sites

Отредактировать не могу но понял видимо проблема не в этом,при регистрации пользователю выдаётся рандомный дом в моём случае 840 был,потом я продал 840 и начало выдавать 839 а если в бд прописываю 0 дом пользователю то всё в порядке его спавнит но в статистике всёравно отображает что он владелец 839 дома (проблему решил,была в базе данных)

 

Edited by edikzver

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • _bogdan_
      By _bogdan_
      Доброго времени суток, такой вопрос, кто сталкивался с такой же проблемой?
       
      Error reporting going to be applied. GTA_ERROR_ATTEMPT_TO_LOAD_OBJECT_INSTANCE_WITH_UNDEFINED_ID enabled. GTA_ERROR_MODEL_DOES_NOT_HAVE_COLLISION_LOADED enabled. GTA_ERROR_IMG_ARCHIVE_NEEDS_REBUILDING enabled. Error reporting is applied now. Я так понимаю нету каких то обьектов.
      Подскажите пожалуйста. За ранее огромное спасибо.