23.06.2013, 00:26
Доброго времени суток, проблема заключается в рестарте сервера. Когда заходишь на сервер, не происходит регестрация\авторизация а сервер начинает рестартить, в server_log все нормально.
public OnPlayerConnect(playerid)
{
carcheck[playerid] = 0;
CarsOffer[playerid] = 999;
CarsPrice[playerid] = 0;
predlogid[playerid] = 999;
predlogidcar[playerid] = 9999;
predlogmoney[playerid] = 0;
carsrpodazha[playerid] = 0;
BizOffer[playerid] = 999;
BizPrice[playerid] = 0;
prodid[playerid] = 999;
prodhouse[playerid] = 255;
prodmoney[playerid] = 0;
prodid[playerid] = 999;
prodhouse[playerid] = 9999;
prodmoney[playerid] = 0;
EnableStuntBonusForPlayer(playerid, 0);
SetSpawnInfo(playerid, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
TextDrawHideForPlayer(playerid, Td_clock);
TextDrawHideForPlayer(playerid, Td_date);
TextDrawHideForPlayer(playerid, Td_fuel);
TextDrawHideForPlayer(playerid, Td_speed);
TextDrawHideForPlayer(playerid, Td_mileage);
TextDrawHideForPlayer(playerid, Td_vehinfo);
TextDrawHideForPlayer(playerid, Td_site);
PlayerAFK[playerid][AFK_Time] = 0;
PlayerAFK[playerid][AFK_Stat] = 0;
kanistra[playerid] = 0;
OOCChat_F[playerid] = 0;
afkto[playerid] = 2;
hDuty[playerid] = false;
PlayerInfo[playerid][pMuteTime] = 0;
PlayerInfo[playerid][pMuted] = 0;
toglogin[playerid] = false;
atoglogin[playerid] = false;
new string[120], ip[20];
GetPlayerIp(playerid, ip, sizeof(ip));
foreach(new i : Player)
{
if(i == playerid) continue;
if(toglogin[i] == true)
{
format(string, sizeof(string), "{33ccff}• Dise Side:{bbbbbb} %s[ID: %d] ïðèñîåäèíèëñÿ íà ñåðâåð.", getpl(playerid), playerid);
send(i, col_grey, string);
}
if(atoglogin[i] == true)
{
format(string, sizeof(string), "{33ccff}• Dise Side:{bbbbbb} %s[ID: %d] ïðèñîåäèíèëñÿ íà ñåðâåð. [IP: %s]", getpl(playerid), playerid, ip);
send(i, col_grey, string);
}
}
tie[playerid] = false;
freeze[playerid] = false;
engined[playerid] = false;
tD_Show[playerid] = false;
for(new i = 0; i < 47; i++) Weapons[playerid][i] = 0;
radio[playerid] = false, StopAudioStreamForPlayer(playerid);
HidePM[playerid] = 0; PhoneOnline[playerid] = 0;
GettingJob[playerid] = 0; UsedFind[playerid] = 0; PlayerHealth[playerid] = 50; Armour[playerid] = 0;
CP[playerid] = 0; Robbed[playerid] = 0; Teleport[playerid] = 0; TeleportTime[playerid] = 9999;
CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
RobbedTime[playerid] = 0; MoneyMessage[playerid] = 0;
RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0;
TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; sLesson[playerid] = false;
RefillOffer[playerid] = 999; RefillPrice[playerid] = 0;
DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
DrugPrice[playerid] = 0;
DrugGram[playerid] = 0; ConnectedToPC[playerid] = 0; OrderReady[playerid] = 0;
JailPrice[playerid] = 0; GotHit[playerid] = 0;
GoChase[playerid] = 999; GetChased[playerid] = 999;
OnDuty[playerid] = 0;
SafeTime[playerid] = 60; TransportDuty[playerid] = 0;
BusCallTime[playerid] = 0; TaxiCallTime[playerid] = 0; MedicCallTime[playerid] = 0; MechanicCallTime[playerid] = 0;
FindTimePoints[playerid] = 0; FindTime[playerid] = 0; JobDuty[playerid] = 0;
Mobile[playerid] = 255;
Spectate[playerid] = 255; PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
Unspec[playerid][sLocal] = 255;
ConsumingMoney[playerid] = 0;
gLastCar[playerid] = 0; FirstSpawn[playerid] = 0;
gOoc[playerid] = 0; gNews[playerid] = 0; bigears[playerid] = false; gDice[playerid] = 0; gFam[playerid] = 0;
gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0;
StartTime[playerid] = 0; TicketOffer[playerid] = 999; TicketMoney[playerid] = 0;
MatsHolding[playerid] = 0;
TaxiAccepted[playerid] = 999; BusAccepted[playerid] = 999;
HireCar[playerid] = 299;
TransportValue[playerid] = 0; TransportMoney[playerid] = 0; TransportTime[playerid] = 0; TransportCost[playerid] = 0; TransportDriver[playerid] = 999;
Locator[playerid] = 0;
WatchingTV[playerid] = 0; PlayerPaintballing[playerid] = 0; PlayerPaintballKills[playerid] = 0;
ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999;
PlayerInfo[playerid][pLevel] = 0;
PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pHelper] = 0;
PlayerInfo[playerid][pDonateRank] = 0;
PlayerInfo[playerid][gPupgrade] = 0;
PlayerInfo[playerid][pTimeInGame] = 0;
PlayerInfo[playerid][pReg] = 0;
PlayerInfo[playerid][pSex] = 0;
PlayerInfo[playerid][pAge] = 0;
PlayerInfo[playerid][pOrigin] = 0;
PlayerInfo[playerid][pRespect] = 0;
PlayerInfo[playerid][pBank] = 0;
PlayerInfo[playerid][pDeaths] = 0;
PlayerInfo[playerid][pPhoneBook] = 0;
PlayerInfo[playerid][pJob] = 0;
PlayerInfo[playerid][pPayCheck] = 0;
PlayerInfo[playerid][pHeadValue] = 0;
PlayerInfo[playerid][pJailed] = 0;
PlayerInfo[playerid][pJailTime] = 0;
PlayerInfo[playerid][pMats] = 0;
PlayerInfo[playerid][pDrugs] = 0;
PlayerInfo[playerid][pLeader] = 0;
PlayerInfo[playerid][pMember] = 0;
PlayerInfo[playerid][pRank] = 0;
PlayerInfo[playerid][pChar] = 0;
PlayerInfo[playerid][pContractTime] = 0;
PlayerInfo[playerid][pDetSkill] = 0;
PlayerInfo[playerid][pMechSkill] = 0;
PlayerInfo[playerid][pJackSkill] = 0;
PlayerInfo[playerid][pCarSkill] = 0;
PlayerInfo[playerid][pDrugsSkill] = 0;
PlayerInfo[playerid][pSHealth] = 0.0;
PlayerInfo[playerid][pHealth] = 50.0;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pPnumber] = 0;
PlayerInfo[playerid][pPhousekey] = 9999;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pLic][0] = false;
PlayerInfo[playerid][pLic][1] = false;
PlayerInfo[playerid][pLic][2] = false;
PlayerInfo[playerid][pLic][3] = false;
PlayerInfo[playerid][pGun1] = 0;
PlayerInfo[playerid][pGun2] = 0;
PlayerInfo[playerid][pGun3] = 0;
PlayerInfo[playerid][pGun4] = 0;
PlayerInfo[playerid][pAmmo1] = 0;
PlayerInfo[playerid][pAmmo2] = 0;
PlayerInfo[playerid][pAmmo3] = 0;
PlayerInfo[playerid][pAmmo4] = 0;
PlayerInfo[playerid][pCarTime] = 0;
PlayerInfo[playerid][pPayDay] = 0;
PlayerInfo[playerid][pAlcoholPerk] = 0;
PlayerInfo[playerid][pDrugPerk] = 0;
PlayerInfo[playerid][pMiserPerk] = 0;
PlayerInfo[playerid][pPainPerk] = 0;
PlayerInfo[playerid][pTraderPerk] = 0;
PlayerInfo[playerid][pWarns] = 0;
PlayerInfo[playerid][pProverka] = false;
PlayerInfo[playerid][pZashytaPass] = 0;
strmid(PlayerInfo[playerid][pMarriedTo], "—", 0, strlen("—"), 24);
PlayerInfo[playerid][pMarried] = 0;
SetPlayerColor(playerid, col_grad2);
//==========================================================================
new day,month,year,chasik,minuta,sec;
getdate(day,month,year);
gettime(chasik,minuta,sec);
pday[playerid] = day;
pmonth[playerid] = month;
pyear[playerid] = year;
pchas[playerid] = chasik;
pmin[playerid] = minuta;
psec[playerid] = sec;
//==========================================================================
new query[80];
mysql_format(cH, query, "SELECT `name` FROM `"TABLE_ACCOUNTS"` WHERE `name` = '%e'", getpl(playerid));
mysql_function_query(cH, query, true, "OnPlayerRegCheck","d", playerid);
return 1;
}