22.11.2011, 11:19
Здравствуйте ещё раз.
Бывает что сразу после рестарта я пытаюсь авторизоваться и сервер падает ничего не написав в server_log.
вот паблик OnPlayerLogin:
Бывает что сразу после рестарта я пытаюсь авторизоваться и сервер падает ничего не написав в server_log.
вот паблик OnPlayerLogin:
Код:
public OnPlayerLogin(playerid,password[]) { MySQLCheckConnection(); new tmp2[256]; new string2[128]; new playername2[MAX_PLAYER_NAME]; new playernamesplit[3][MAX_PLAYER_NAME]; GetPlayerName(playerid, playername2, sizeof(playername2)); split(playername2, playernamesplit, '_'); MySQLFetchAcctSingle(PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pKey]); if(strcmp(PlayerInfo[playerid][pKey],password, true ) != 0) { gPlayerLogTries[playerid] += 1; new loginmsg[256+1]; new invalidlogin[MAX_PLAYERS]; invalidlogin[playerid] = 4; invalidlogin[playerid] -= gPlayerLogTries[playerid]; format(loginmsg,256,"{ff0000}Такая комбинация ника и пароля не найдена!\n{ffffff}Если вы забыли пароль, свяжитесь с администрацией сервера.\nПопыток авторизации осталось: {ff0000}%d",invalidlogin[playerid]); ShowPlayerDialog(playerid,31,DIALOG_STYLE_PASSWORD,"Авторизация",loginmsg,"Войти","Выход"); if(gPlayerLogTries[playerid] == 4) { Ban(playerid); } return 1; } new Data[1024]; new Field[64]; new rcnt = 1; MySQLFetchAcctRecord(PlayerInfo[playerid][pSQLID], Data); samp_mysql_strtok(Field, "|", Data); while (samp_mysql_strtok(Field, "|", "")==1) { if (rcnt == 3) PlayerInfo[playerid][pLevel] = strval(Field); if (rcnt == 4) PlayerInfo[playerid][pMaxAge] = strval(Field); if (rcnt == 5) PlayerInfo[playerid][pOldLevel] = strval(Field); if (rcnt == 6) PlayerInfo[playerid][pLunatik] = strval(Field); if (rcnt == 7) PlayerInfo[playerid][pTazer] = strval(Field); if (rcnt == 8) PlayerInfo[playerid][pAptechka] = strval(Field); if (rcnt == 9) PlayerInfo[playerid][pZhuchok] = strval(Field); if (rcnt == 10) PlayerInfo[playerid][pBelt] = strval(Field); if (rcnt == 11) PlayerInfo[playerid][pOtvez] = strval(Field); if (rcnt == 12) PlayerInfo[playerid][pSudim] = strval(Field); if (rcnt == 13) PlayerInfo[playerid][pKanistra] = strval(Field); if (rcnt == 14) PlayerInfo[playerid][pBrutForce] = strval(Field); if (rcnt == 15) PlayerInfo[playerid][pMask] = strval(Field); if (rcnt == 16) PlayerInfo[playerid][pBolnica] = strval(Field); if (rcnt == 17) PlayerInfo[playerid][pWantedLevel] = strval(Field); if (rcnt == 18) PlayerInfo[playerid][pHelper] = strval(Field); if (rcnt == 19) PlayerInfo[playerid][pPivo] = strval(Field); if (rcnt == 20) PlayerInfo[playerid][pChips] = strval(Field); if (rcnt == 21) PlayerInfo[playerid][pAdmin] = strval(Field); if (rcnt == 22) PlayerInfo[playerid][pDonateRank] = strval(Field); if (rcnt == 23) PlayerInfo[playerid][gPupgrade] = strval(Field); if (rcnt == 24) PlayerInfo[playerid][pConnectTime] = strval(Field); if (rcnt == 25) PlayerInfo[playerid][pReg] = strval(Field); if (rcnt == 26) PlayerInfo[playerid][pSex] = strval(Field); if (rcnt == 27) PlayerInfo[playerid][pAge] = strval(Field); if (rcnt == 28) PlayerInfo[playerid][pOrigin] = strval(Field); if (rcnt == 29) PlayerInfo[playerid][pCK] = strval(Field); if (rcnt == 30) PlayerInfo[playerid][pActived] = strval(Field); if (rcnt == 31) PlayerInfo[playerid][pMuted] = strval(Field); if (rcnt == 32) PlayerInfo[playerid][pExp] = strval(Field); if (rcnt == 33) PlayerInfo[playerid][pSkuril] = strval(Field); if (rcnt == 34) PlayerInfo[playerid][pUpotrebil] = strval(Field); if (rcnt == 35) PlayerInfo[playerid][pVipil] = strval(Field); if (rcnt == 36) PlayerInfo[playerid][pCash] = strval(Field); if (rcnt == 37) PlayerInfo[playerid][pAccount] = strval(Field); if (rcnt == 38) PlayerInfo[playerid][pCrimes] = strval(Field); if (rcnt == 39) PlayerInfo[playerid][pKills] = strval(Field); if (rcnt == 40) PlayerInfo[playerid][pDeaths] = strval(Field); if (rcnt == 41) PlayerInfo[playerid][pWantedDeaths] = strval(Field); if (rcnt == 42) PlayerInfo[playerid][pLottoNr] = strval(Field); if (rcnt == 43) PlayerInfo[playerid][pFishes] = strval(Field); if (rcnt == 44) PlayerInfo[playerid][pBiggestFish] = strval(Field); if (rcnt == 45) PlayerInfo[playerid][pJob] = strval(Field); if (rcnt == 46) PlayerInfo[playerid][pPayCheck] = strval(Field); if (rcnt == 47) PlayerInfo[playerid][pHeadValue] = strval(Field); if (rcnt == 48) PlayerInfo[playerid][pJailed] = strval(Field); if (rcnt == 49) PlayerInfo[playerid][pJailTime] = strval(Field); if (rcnt == 50) PlayerInfo[playerid][pGashishEffect] = strval(Field); if (rcnt == 51) PlayerInfo[playerid][pFenEffect] = strval(Field); if (rcnt == 52) PlayerInfo[playerid][pHeroinEffect] = strval(Field); if (rcnt == 53) PlayerInfo[playerid][pCocaineEffect] = strval(Field); if (rcnt == 54) PlayerInfo[playerid][pMarihuannaEffect] = strval(Field); if (rcnt == 55) PlayerInfo[playerid][pEEEffect] = strval(Field); if (rcnt == 56) PlayerInfo[playerid][pSEEffect] = strval(Field); if (rcnt == 57) PlayerInfo[playerid][pPrison] = strval(Field); if (rcnt == 58) PlayerInfo[playerid][pPrisonTime] = strval(Field); if (rcnt == 59) PlayerInfo[playerid][pRiseReset] = strval(Field); if (rcnt == 60) PlayerInfo[playerid][pMats] = strval(Field); if (rcnt == 61) PlayerInfo[playerid][pGashish] = floatstr(Field); if (rcnt == 62) PlayerInfo[playerid][pMetamfetamin] = floatstr(Field); if (rcnt == 63) PlayerInfo[playerid][pHeroin] = floatstr(Field); if (rcnt == 64) PlayerInfo[playerid][pCocaine] = floatstr(Field); if (rcnt == 65) PlayerInfo[playerid][pMarihuanna] = floatstr(Field); if (rcnt == 66) PlayerInfo[playerid][pSemena] = strval(Field); if (rcnt == 67) PlayerInfo[playerid][pEuphoriaExtazy] = strval(Field); if (rcnt == 68) PlayerInfo[playerid][pSpeedExtazy] = strval(Field); if (rcnt == 69) PlayerInfo[playerid][pLeader] = strval(Field); if (rcnt == 70) PlayerInfo[playerid][pMember] = strval(Field); if (rcnt == 71) PlayerInfo[playerid][pRank] = strval(Field); if (rcnt == 72) PlayerInfo[playerid][pChar] = strval(Field); if (rcnt == 73) PlayerInfo[playerid][pJobChar] = strval(Field); if (rcnt == 74) PlayerInfo[playerid][pContractTime] = strval(Field); if (rcnt == 75) PlayerInfo[playerid][pDetSkill] = strval(Field); if (rcnt == 76) PlayerInfo[playerid][pPistolSkill] = strval(Field); if (rcnt == 77) PlayerInfo[playerid][pSPistolSkill] = strval(Field); if (rcnt == 78) PlayerInfo[playerid][pAK47Skill] = strval(Field); if (rcnt == 79) PlayerInfo[playerid][pM4Skill] = strval(Field); if (rcnt == 80) PlayerInfo[playerid][pDeagleSkill] = strval(Field); if (rcnt == 81) PlayerInfo[playerid][pMP5Skill] = strval(Field); if (rcnt == 82) PlayerInfo[playerid][pSexSkill] = strval(Field); if (rcnt == 83) PlayerInfo[playerid][pBoxSkill] = strval(Field); if (rcnt == 84) PlayerInfo[playerid][pLawSkill] = strval(Field); if (rcnt == 85) PlayerInfo[playerid][pMechSkill] = strval(Field); if (rcnt == 86) PlayerInfo[playerid][pJackSkill] = strval(Field); if (rcnt == 87) PlayerInfo[playerid][pCarSkill] = strval(Field); if (rcnt == 88) PlayerInfo[playerid][pNewsSkill] = strval(Field); if (rcnt == 89) PlayerInfo[playerid][pDrugsSkill] = strval(Field); if (rcnt == 90) PlayerInfo[playerid][pCookSkill] = strval(Field); if (rcnt == 91) PlayerInfo[playerid][pFishSkill] = strval(Field); if (rcnt == 92) PlayerInfo[playerid][pSHealth] = floatstr(Field); if (rcnt == 93) PlayerInfo[playerid][pHealth] = floatstr(Field); if (rcnt == 94) PlayerInfo[playerid][pRace] = strval(Field); if (rcnt == 95) PlayerInfo[playerid][pGps] = strval(Field); if (rcnt == 96) PlayerInfo[playerid][pInt] = strval(Field); if (rcnt == 97) PlayerInfo[playerid][pLocal] = strval(Field); if (rcnt == 98) PlayerInfo[playerid][pTeam] = strval(Field); if (rcnt == 99) PlayerInfo[playerid][pTA] = strval(Field); if (rcnt == 100) PlayerInfo[playerid][pPhone] = strval(Field); if (rcnt == 101) PlayerInfo[playerid][pPnumber] = strval(Field); if (rcnt == 102) PlayerInfo[playerid][pSD] = strval(Field); if (rcnt == 103) PlayerInfo[playerid][pPcarkey] = strval(Field); if (rcnt == 104) PlayerInfo[playerid][pPcarkey2] = strval(Field); if (rcnt == 105) PlayerInfo[playerid][pPcarkey3] = strval(Field); if (rcnt == 106) PlayerInfo[playerid][pPcarkey4] = strval(Field); if (rcnt == 107) PlayerInfo[playerid][pPhousekey] = strval(Field); if (rcnt == 108) PlayerInfo[playerid][pPbiskey] = strval(Field); if (rcnt == 109) PlayerInfo[playerid][pSignBrelok] = strval(Field); if (rcnt == 110) PlayerInfo[playerid][pPos_x] = floatstr(Field); if (rcnt == 111) PlayerInfo[playerid][pPos_y] = floatstr(Field); if (rcnt == 112) PlayerInfo[playerid][pPos_z] = floatstr(Field); if (rcnt == 113) PlayerInfo[playerid][pCarLicA] = strval(Field); if (rcnt == 114) PlayerInfo[playerid][pCarLicB] = strval(Field); if (rcnt == 115) PlayerInfo[playerid][pCarLicC] = strval(Field); if (rcnt == 116) PlayerInfo[playerid][pInAutoScholl] = strval(Field); if (rcnt == 117) PlayerInfo[playerid][pWarTicket] = strval(Field); if (rcnt == 118) PlayerInfo[playerid][pGetpassport] = strval(Field); if (rcnt == 119) PlayerInfo[playerid][pFlyLic] = strval(Field); if (rcnt == 120) PlayerInfo[playerid][pBoatLic] = strval(Field); if (rcnt == 121) PlayerInfo[playerid][pFishLic] = strval(Field); if (rcnt == 122) PlayerInfo[playerid][pGunLic] = strval(Field); if (rcnt == 123) PlayerInfo[playerid][pCarTime] = strval(Field); if (rcnt == 124) PlayerInfo[playerid][pPayDay] = strval(Field); if (rcnt == 125) PlayerInfo[playerid][pPayDayHad] = strval(Field); if (rcnt == 126) PlayerInfo[playerid][pWatch] = strval(Field); if (rcnt == 127) PlayerInfo[playerid][pCrashed] = strval(Field); if (rcnt == 128) PlayerInfo[playerid][pWins] = strval(Field); if (rcnt == 129) PlayerInfo[playerid][pLoses] = strval(Field); if (rcnt == 130) PlayerInfo[playerid][pAlcoholPerk] = strval(Field); if (rcnt == 131) PlayerInfo[playerid][pDrugPerk] = strval(Field); if (rcnt == 132) PlayerInfo[playerid][pMiserPerk] = strval(Field); if (rcnt == 133) PlayerInfo[playerid][pPainPerk] = strval(Field); if (rcnt == 134) PlayerInfo[playerid][pTraderPerk] = strval(Field); if (rcnt == 135) PlayerInfo[playerid][pTut] = strval(Field); if (rcnt == 136) PlayerInfo[playerid][pRPTest] = strval(Field); if (rcnt == 137) PlayerInfo[playerid][pMissionNr] = strval(Field); if (rcnt == 138) PlayerInfo[playerid][pWarns] = strval(Field); if (rcnt == 139) PlayerInfo[playerid][pVirWorld] = strval(Field); if (rcnt == 140) PlayerInfo[playerid][pFuel] = strval(Field); if (rcnt == 141) PlayerInfo[playerid][pMarried] = strval(Field); if (rcnt == 142) PlayerInfo[playerid][pMarriedTo] = strmid(PlayerInfo[playerid][pMarriedTo], Field, 0, strlen(Field), 255); if (rcnt == 143) PlayerInfo[playerid][pFishTool] = strval(Field); if (rcnt == 144) PlayerInfo[playerid][pNote1] = strmid(PlayerInfo[playerid][pNote1], Field, 0, strlen(Field), 255); if (rcnt == 145) PlayerInfo[playerid][pNote1s] = strval(Field); if (rcnt == 146) PlayerInfo[playerid][pNote2] = strmid(PlayerInfo[playerid][pNote2], Field, 0, strlen(Field), 255); if (rcnt == 147) PlayerInfo[playerid][pNote2s] = strval(Field); if (rcnt == 148) PlayerInfo[playerid][pNote3] = strmid(PlayerInfo[playerid][pNote3], Field, 0, strlen(Field), 255); if (rcnt == 159) PlayerInfo[playerid][pNote3s] = strval(Field); if (rcnt == 150) PlayerInfo[playerid][pNote4] = strmid(PlayerInfo[playerid][pNote4], Field, 0, strlen(Field), 255); if (rcnt == 151) PlayerInfo[playerid][pNote4s] = strval(Field); if (rcnt == 152) PlayerInfo[playerid][pNote5] = strmid(PlayerInfo[playerid][pNote5], Field, 0, strlen(Field), 255); if (rcnt == 153) PlayerInfo[playerid][pNote5s] = strval(Field); if (rcnt == 154) PlayerInfo[playerid][pGun0] = strval(Field); if (rcnt == 155) PlayerInfo[playerid][pGun1] = strval(Field); if (rcnt == 156) PlayerInfo[playerid][pGun2] = strval(Field); if (rcnt == 157) PlayerInfo[playerid][pGun3] = strval(Field); if (rcnt == 158) PlayerInfo[playerid][pGun4] = strval(Field); if (rcnt == 159) PlayerInfo[playerid][pGun5] = strval(Field); if (rcnt == 160) PlayerInfo[playerid][pGun6] = strval(Field); if (rcnt == 161) PlayerInfo[playerid][pGun7] = strval(Field); if (rcnt == 162) PlayerInfo[playerid][pGun8] = strval(Field); if (rcnt == 163) PlayerInfo[playerid][pGun9] = strval(Field); if (rcnt == 164) PlayerInfo[playerid][pGun10] = strval(Field); if (rcnt == 165) PlayerInfo[playerid][pGun11] = strval(Field); if (rcnt == 166) PlayerInfo[playerid][pAmmo0] = strval(Field); if (rcnt == 167) PlayerInfo[playerid][pAmmo1] = strval(Field); if (rcnt == 168) PlayerInfo[playerid][pAmmo2] = strval(Field); if (rcnt == 169) PlayerInfo[playerid][pAmmo3] = strval(Field); if (rcnt == 170) PlayerInfo[playerid][pAmmo4] = strval(Field); if (rcnt == 171) PlayerInfo[playerid][pAmmo5] = strval(Field); if (rcnt == 172) PlayerInfo[playerid][pAmmo6] = strval(Field); if (rcnt == 173) PlayerInfo[playerid][pAmmo7] = strval(Field); if (rcnt == 174) PlayerInfo[playerid][pAmmo8] = strval(Field); if (rcnt == 175) PlayerInfo[playerid][pAmmo9] = strval(Field); if (rcnt == 176) PlayerInfo[playerid][pAmmo10] = strval(Field); if (rcnt == 177) PlayerInfo[playerid][pAmmo11] = strval(Field); if (rcnt == 178) PlayerInfo[playerid][pInvWeaponLight] = strval(Field); if (rcnt == 179) PlayerInfo[playerid][pInvAmmoLight] = strval(Field); if (rcnt == 180) PlayerInfo[playerid][pInvWeaponMedium] = strval(Field); if (rcnt == 181) PlayerInfo[playerid][pInvAmmoMedium] = strval(Field); if (rcnt == 182) PlayerInfo[playerid][pInvWeaponHeavy] = strval(Field); if (rcnt == 183) PlayerInfo[playerid][pInvAmmoHeavy] = strval(Field); if (rcnt == 184) PlayerInfo[playerid][pLighter] = strval(Field); if (rcnt == 185) PlayerInfo[playerid][pCigarettes] = strval(Field); if (rcnt == 186) PlayerInfo[playerid][pClock] = strval(Field); if (rcnt == 187) PlayerInfo[playerid][pLocked] = strval(Field); if (rcnt == 188) PlayerInfo[playerid][pCashCredit] = strval(Field); if (rcnt == 189) PlayerInfo[playerid][pCredit] = strval(Field); if (rcnt == 190) PlayerInfo[playerid][pRobbedBank] = strval(Field); if (rcnt == 191) PlayerInfo[playerid][pCreditTime] = strval(Field); if (rcnt == 192) PlayerInfo[playerid][pMuteTime] = strval(Field); if (rcnt == 193) PlayerInfo[playerid][pRadio] = strval(Field); if (rcnt == 194) PlayerInfo[playerid][pSignaliz] = strval(Field); if (rcnt == 195) PlayerInfo[playerid][pStolenPhone] = strval(Field); if (rcnt == 196) PlayerInfo[playerid][pStolenRadio] = strval(Field); if (rcnt == 197) PlayerInfo[playerid][pStolenClock] = strval(Field); if (rcnt == 198) PlayerInfo[playerid][pBoxing] = strval(Field); if (rcnt == 199) PlayerInfo[playerid][pKunfu] = strval(Field); if (rcnt == 200) PlayerInfo[playerid][pKneehead] = strval(Field); if (rcnt == 201) PlayerInfo[playerid][pGrabkick] = strval(Field); if (rcnt == 202) PlayerInfo[playerid][pOnline] = strval(Field); if (rcnt == 203) PlayerInfo[playerid][pShopKey] = strval(Field); if (rcnt == 205) PlayerInfo[playerid][pCity] = strval(Field); rcnt++; } samp_mysql_free_result(); Camera[playerid] = 0;//Нужно для камеры MRP_SetPlayerMoney(playerid,PlayerInfo[playerid][pCash]); if(PlayerInfo[playerid][pMaxAge] == 0) { PlayerInfo[playerid][pMaxAge] = 92; } if(PlayerInfo[playerid][pActived] == -1) { PlayerInfo[playerid][pActived] = 1; } if(PlayerInfo[playerid][pReg] == 0) { PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pMaxAge] = 92; PlayerInfo[playerid][pOldLevel] = 0; PlayerInfo[playerid][pSHealth] = 0.0; PlayerInfo[playerid][pHealth] = 100.0; PlayerInfo[playerid][pPos_x] = 218.3016; PlayerInfo[playerid][pPos_y] = -230.1416; PlayerInfo[playerid][pPos_z] = 1.7700; PlayerInfo[playerid][pInt] = 0; PlayerInfo[playerid][pGps] = 0; PlayerInfo[playerid][pLocal] = 255; PlayerInfo[playerid][pTeam] = 3; PlayerInfo[playerid][pChar] = 35; PlayerInfo[playerid][pCK] = 0; PlayerInfo[playerid][pActived] = 1; PlayerInfo[playerid][pPnumber] = 0;//Вначале телефон не даем PlayerInfo[playerid][pPhousekey] = 255; PlayerInfo[playerid][pPcarkey] = 999; PlayerInfo[playerid][pPcarkey2] = 999; PlayerInfo[playerid][pPcarkey3] = 999; PlayerInfo[playerid][pPcarkey4] = 999; PlayerInfo[playerid][pShopKey] = 255; PlayerInfo[playerid][pPbiskey] = 255; PlayerInfo[playerid][pAccount] = 0; // кол-во денег в банке при респе PlayerInfo[playerid][pReg] = 1; MRP_SetPlayerMoney(playerid,50); PlayerInfo[playerid][pMuteTime]=0; PlayerInfo[playerid][pHaveMute]=0; Kazna -= 50; SaveStuff(); } if(PlayerInfo[playerid][pLocked] == 1) // Auto-kick { SendClientMessage(playerid, COLOR_LIGHTRED, " Твой аккаунт заблокирован. Свяжись с админом на форуме; 'Случайно забанен'."); Kick(playerid); } if(PlayerInfo[playerid][pLevel] == -999) //autoban { Ban(playerid); } if(PlayerInfo[playerid][pCK] == 1) { SendClientMessage(playerid,COLOR_LIGHTRED,"Этот персонаж мёртв по РП! Вы не можете играть им!"); Kick(playerid); } if(PlayerInfo[playerid][pActived] == 0) { SendClientMessage(playerid,COLOR_LIGHTRED,"Этот персонаж дезактивирован."); Kick(playerid); } new ipaddress[16]; GetPlayerIp(playerid,ipaddress,sizeof(ipaddress)); MySQLAddLoginRecord(PlayerInfo[playerid][pSQLID], ipaddress); ClearChatbox(playerid, 8); SendClientMessage(playerid, COLOR_GREEN, "{00ff00}*** {ffffff}Добро пожаловать! {00ff00}***"); format(string2, sizeof(string2), " Здравствуйте {ccff00}%s {ffffff}, Добро пожаловать на Los Angeles RolePlay.",playernamesplit[0]); SendClientMessage(playerid, COLOR_WHITE,string2); SendClientMessage(playerid, COLOR_WHITE, " Наш форум: {ff0000}http://forum.la-rp.ru"); MRP_CreateMoneySysForPlayer(playerid); MRP_MoneyTextDrawShowForPlayer(playerid); if(PlayerInfo[playerid][pOtvez] == 1) { SetTimerEx("ResetIzvoz",1200000,false,"i",playerid); } if(PlayerInfo[playerid][pOtvez] == 2) { SetTimerEx("ResetIzvoz",4800000,false,"i",playerid); } if (PlayerInfo[playerid][pDonateRank] > 0) { new drank[64]; if(PlayerInfo[playerid][pDonateRank] == 1) { drank = "{cd7f32}Бронзовый Аккаунт"; } else if(PlayerInfo[playerid][pDonateRank] == 2) { drank = "{c0c0c0}Серебрянный Аккаунт"; } else if(PlayerInfo[playerid][pDonateRank] == 3) { drank = "{ffd700}Золотой Аккаунт"; } format(string2,sizeof(string2),"Donate Rank: %s",drank); SendClientMessage(playerid,COLOR_WHITE,string2); } if (PlayerInfo[playerid][pAdmin] > 0) { format(string2, sizeof(string2), " СЕРВЕР: Ты залогинился как админ %d уровня.",PlayerInfo[playerid][pAdmin]); SendClientMessage(playerid, COLOR_WHITE,string2); } printf("%s вошёл под своим паролем.",playername2); SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid); 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]; } gPlayerLogged[playerid] = 1; SpawnPlayer(playerid); if(PlayerInfo[playerid][pCrashed] == 0) { if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1) { if(PlayerInfo[playerid][pPos_x] == 0 && PlayerInfo[playerid][pPos_y] == 0 && PlayerInfo[playerid][pPos_z] == 0) { SetPlayerPos(playerid,1515.2296,-1673.9766,14.0469); SendClientMessage(playerid,COLOR_LIGHTRED,"Ваша старая позиция сбилась! Вы появились в центре!"); SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; PlayerInfo[playerid][pVirWorld] = 0; } else { SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1); SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]); SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]); format(tmp2, sizeof(tmp2), "~w~Wellcome ~n~~y~ %s", playername2); } } } if(PlayerInfo[playerid][pCrashed] > 0) { if(PlayerInfo[playerid][pCrashed] == 1) { if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1) { if(PlayerInfo[playerid][pPos_x] == 0 && PlayerInfo[playerid][pPos_y] == 0 && PlayerInfo[playerid][pPos_z] == 0) { SetPlayerPos(playerid,1515.2296,-1673.9766,14.0469); SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; PlayerInfo[playerid][pVirWorld] = 0; SendClientMessage(playerid,COLOR_LIGHTRED,"Ваша старая позиция сбилась! Вы появились в центре!"); format(tmp2, sizeof(tmp2), "~g~Crashed...~n~~y~Wellcome~n~ %s", playername2); } else { SetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z] + 1); SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pVirWorld]); SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]); format(tmp2, sizeof(tmp2), "~g~Crashed...~n~~y~Wellcome~n~ %s", playername2); } } } if(PlayerInfo[playerid][pCrashed] == 2) { if(TutTime[playerid] == 0 && PlayerInfo[playerid][pTut] == 1 && RegistrationStep[playerid] == 0 && AfterTutorial[playerid] == 0 && FirstSpawn[playerid] == 1) { if(PlayerInfo[playerid][pPos_x] == 0 && PlayerInfo[playerid][pPos_y] == 0 && PlayerInfo[playerid][pPos_z] == 0) { SetPlayerPos(playerid,1515.2296,-1673.9766,14.0469); SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; PlayerInfo[playerid][pVirWorld] = 0; SendClientMessage(playerid,COLOR_LIGHTRED,"Ваша старая позиция сбилась! Вы появились в центре!"); format(tmp2, sizeof(tmp2), "~g~Crashed...~n~~y~Wellcome~n~ %s", playername2); } else { SetPlayerPos(playerid,1515.2296,-1673.9766,14.0469); SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); PlayerInfo[playerid][pInt] = 0; PlayerInfo[playerid][pVirWorld] = 0; format(tmp2, sizeof(tmp2), "~r~Critical Crash~n~~y~Wellcome~n~ %s", playername2); } } } SetTimerEx("UnsetCrash", 60000, false, "i", playerid); } DateProp(playerid); GameTextForPlayer(playerid, tmp2, 5000, 1); for(new i; i <= maxPlayerID; ++i) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pMaskuse] == 1) { ShowPlayerNameTagForPlayer(playerid, i, 0); } } } return 1; }