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



Не найдено.

28 posts in this topic

Помогите пожалуйста, я уже весь мод перевертел, но не смог исправить баг с сохранением лидерки, я выдаю лидерку релогаюсь а она пропадает

Вот коды:

 

 


CMD:setleader(playerid, params[])
{
    if(GetString(GetName(playerid), NAME_DEVELOPER_ONE) || GetString(GetName(playerid), NAME_DEVELOPER_TWO) || GetString(GetName(playerid), NAME_DEVELOPER_THREE) || GetString(GetName(playerid), NAME_DEVELOPER_FIVE) || GetString(GetName(playerid), NAME_LEADERS_ONE) || GetString(GetName(playerid), NAME_LEADERS_TWO))
    {
        if(PI[playerid][pAdmin] < 1) return 1;
        else if(AdminLogged[playerid] == false) return SCM(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
        else if(sscanf(params, "u", params[0])) return SCM(playerid, COLOR_WHITE, "• {66CC00}[ Ïîäñêàçêà ] {ffffff}Ââåäèòå: /setleader [id èãðîêà]");
        else if(!IsPlayerConnected(params[0])) return SCM(playerid, COLOR_GREY, PlayerIsNotOnline);
        else if(PlayerLogged[params[0]] == false) return SCM(playerid, COLOR_GREY, PlayerIsNotAuthorized);
        else if(IsPlayerInAnyVehicle(params[0])) return SCM(playerid, COLOR_GREY, "Èãðîê íå äîëæåí íàõîäèòüñÿ â òðàíñïîðòå!");
        else if((PI[params[0]][pAdmin] >= 1 && PI[params[0]][pAdmin] <= 7) && PI[playerid][pAdmin] != 8) return SCM(playerid, COLOR_GREY, "Àäìèíèñòðàòîðà íåëüçÿ ñòàâèòü íà ïîñò ëèäåðà!");
        else if(PI[params[0]][pLevel] < 3) return SCM(playerid, COLOR_GREY, "Ó èãðîêà ìåíüøå ÷åì 3 óðîâåíü!");
        else if(PI[params[0]][pTempLeader]) return SCM(playerid, COLOR_GREY, "Ñíà÷àëà ñíèìèòå ñ ñåáÿ ïðàâà âðåìåííîãî ëèäåðà!");
        if(PI[params[0]][pLeader])
        {
            LeaveFractionPlayer(params[0]);
            SendMes(playerid, COLOR_BLUE, "Âû ñíÿëè %s ñ äîëæíîñòè ëèäåðà îðãàíèçàöèè",GetName(params[0]));
            SendMes(params[0], COLOR_BLUE, "Àäìèíèñòðàòîð %s ñíÿë âàñ ñ äîëæíîñòè ëèäåðà îðãàíèçàöèè", GetName(playerid));
        }
        else
        {
            if(PI[params[0]][pLeader] > 0) return SCM(playerid, COLOR_GREY, "Èãðîê ëèäåð äðóãîé îðãàíèçàöèè!");
            else if(PI[params[0]][pMember] > 0) return SCM(playerid, COLOR_GREY, "Èãðîê íàõîäèòüñÿ â äðóãîé îðãàíèçàöèè!");
            new str[64], str2[712];
            for(new i = 1; i < MAX_FRACTIONS; i++)
            {
                format(str, sizeof(str), "¹%i - %s\n", i, Fraction_Name[i]);
                strcat(str2, str);
            }
            SetPVarInt(playerid, "actplayerid", params[0]);
            ShowPlayerDialog(playerid, D_FRACMENU, 2, "{ffcc00}Îðãàíèçàöèè", str2, "Ïðèíÿòü", "Îòìåíà");
        }
    }
    return 1;
}

 




        case D_FRACMENU:
        {
            if(!response) return DeletePVar(playerid, "actplayerid");
            SetPVarInt(playerid, "actfraction", listitem+1);
            new fractionid = GetPVarInt(playerid, "actfraction");
            new mes[128];
            for(new i; i < 8; i++)
            {
                new skinid = Fraction_Skin[fractionid][i];
                if(!skinid) break;
                if(!i) format(mes, sizeof(mes), "Ñêèí %d [%d]", i+1, skinid);
                else format(mes, sizeof(mes), "%s\nÑêèí %d [%d]", mes, i+1, skinid);
            }
            ShowPlayerDialog(playerid, D_LEADERSKIN, 2, "{ffa500}Âûáîð ñêèíà", mes, "Ïðèíÿòü", "Îòìåíà");
        }

 



        case D_LEADERSKIN:
        {
            if(!response)
            {
                DeletePVar(playerid, "actplayerid");
                DeletePVar(playerid, "actfraction");
                return 1;
            }
            new actplayerid = GetPVarInt(playerid, "actplayerid");
            new fractionid = GetPVarInt(playerid, "actfraction");
            new skinid = Fraction_Skin[fractionid][listitem];
            if(!IsPlayerConnected(actplayerid)) return SCM(playerid, COLOR_GREY, PlayerIsNotOnline);
            else if(!PlayerLogged[actplayerid]) return SCM(playerid, COLOR_GREY, PlayerIsNotAuthorized);
            switch(fractionid)
            {
                case TEAM_ARMIYA: PI[actplayerid][pRank] = 12;
                case TEAM_FBI: PI[actplayerid][pRank] = 16;
                case TEAM_POLICIA,TEAM_DPS,TEAM_MERIA,TEAM_BOLNICA,TEAM_ITALYM,TEAM_RM,TEAM_OPG1,TEAM_OPG2,TEAM_SMI: PI[actplayerid][pRank] = 10;
                case TEAM_AUTOSCHOOL: PI[actplayerid][pRank] = 8;
            }
            PI[actplayerid][pLeader] = PI[actplayerid][pMember] = fractionid;
            PI[actplayerid][pJob] = 0;
            PI[actplayerid][pMemberSkin] = skinid;
            SetPlayerSkin(actplayerid, PI[actplayerid][pMemberSkin]);
            new string[128];
            format(string, sizeof(string), "Âû íàçíà÷èëè %s ëèäåðîì îðãàíèçàöèè: %s", GetName(actplayerid), Fraction_Name[fractionid]);
            SCM(playerid, COLOR_LIME, string);
            format(string, sizeof(string), "Àäìèíèñòðàòîð %s íàçíà÷èë Âàñ ëèäåðîì îðãàíèçàöèè: %s", GetName(playerid), Fraction_Name[fractionid]);
            SCM(actplayerid, COLOR_BLUE, string);
            format(string, sizeof(string), "[A] %s íàçíà÷èë %s ëèäåðîì îðãàíèçàöèè \"%s\"", GetName(playerid), GetName(actplayerid), Fraction_Name[fractionid]);
            SendAdminMessage(COLOR_GREY, string);
            SendLog("SetLeader", string);
            ResetPlayerWeaponsAC(actplayerid);
            SetPlayerColorEx(actplayerid, TeamColors[GetTeamID(actplayerid)]);
            DeletePVar(playerid, "actplayerid");
            DeletePVar(playerid, "actfraction");
        }

 



stock SaveAcc()
{
     foreach(new i: Player)
    {
        if(PlayerLogged[i] == false) continue;
        SaveAccount(i);
    }
    return 1;
}


CMD:saveacc(playerid, params[])
{
    if(PI[playerid][pAdmin] < 8) return 1;
    else if(AdminLogged[playerid] == false) return SCM(playerid, COLOR_GREY, YouAreNotLoggedInAsAdmin);
    SaveAcc();
    SCM(playerid, COLOR_GREY, "Âû óñïåøíî ñîõðàíèëè âñå àêêàóíòû");
    new string[128];
    format(string, sizeof(string), "Ðàçðàáîò÷èê %s [%d] ñäåëàë ñîõðàíåíèå âñåõ àêêàóíòîâ", GetName(playerid), playerid);
    SendAdminMessage(COLOR_GREY, string);
    return 1;
}

 



stock SaveAccount(playerid)
{
    if(PlayerLogged[playerid] == false || IsPlayerConnected(playerid) == 0) return 1;
    new zapros[128];
    
    format(PI[playerid][pSettings],64,"%i, %i, %i, %i, %i, %i, %i",PI[playerid][pSetting][0],PI[playerid][pSetting][1],PI[playerid][pSetting][2],PI[playerid][pSetting][3],PI[playerid][pSetting][4],PI[playerid][pSetting][5],PI[playerid][pSetting][6]);
    format(PI[playerid][pImproves],64,"%i, %i, %i, %i",PI[playerid][pImprove][0],PI[playerid][pImprove][1],PI[playerid][pImprove][2],PI[playerid][pImprove][3]);
    format(PI[playerid][pLics],64,"%i, %i, %i, %i",PI[playerid][pLic][0],PI[playerid][pLic][1],PI[playerid][pLic][2],PI[playerid][pLic][3]);
    format(PI[playerid][pRepcars],64,"%i, %i",PI[playerid][pRepcar][0],PI[playerid][pRepcar][1]);
    
    new string[3128] = "UPDATE "T_ACCOUNTS" SET";
    
    f(string, "%s `name` = '%s', ",                string, PI[playerid][pName]);
    f(string, "%s `ip` = '%s', ",                  string, PI[playerid][pIP]);
    f(string, "%s `admin` = '%d', ",               string, PI[playerid][pAdmin]);
    f(string, "%s `securitycode` = '%i', ",        string, PI[playerid][pSecurityCode]);
    f(string, "%s `level` = '%d', ",               string, PI[playerid][pLevel]);
    f(string, "%s `cash` = '%d', ",                string, PI[playerid][pCash]);
    f(string, "%s `bank` = '%d', ",                string, PI[playerid][pBank]);
    f(string, "%s `exp` = '%d', ",                 string, PI[playerid][pExp]);
    f(string, "%s `leader` = '%d', ",              string, PI[playerid][pLeader]);
    f(string, "%s `templeader` = '%d', ",          string, PI[playerid][pTempLeader]);
    f(string, "%s `member` = '%d', ",              string, PI[playerid][pMember]);
    f(string, "%s `rank` = '%d', ",                string, PI[playerid][pRank]);
    f(string, "%s `warn` = '%d', ",                string, PI[playerid][pWarn]);
    f(string, "%s `sex` = '%d', ",                 string, PI[playerid][pSex]);
    f(string, "%s `age` = '%d', ",                 string, PI[playerid][pAge]);
    f(string, "%s `model` = '%d', ",               string, PI[playerid][pModel]);
    f(string, "%s `memberskin` = '%d', ",          string, PI[playerid][pMemberSkin]);
    f(string, "%s `lic` = '%s', ",                 string, PI[playerid][pLics]);
    f(string, "%s `mute` = '%d', ",                string, PI[playerid][pMuted]);
    f(string, "%s `pick` = '%d', ",                string, PI[playerid][pPick]);
    f(string, "%s `checktime` = '%d', ",           string, PI[playerid][pCheckTime]);
    f(string, "%s `news` = '%d', ",                string, PI[playerid][pNews]);
    f(string, "%s `phonenumber` = '%d', ",         string, PI[playerid][pPhoneNumber]);
    f(string, "%s `jail` = '%d', ",                string, PI[playerid][pJail]);
    f(string, "%s `jailtime` = '%d', ",            string, PI[playerid][pJailTime]);
    f(string, "%s `wanted` = '%d', ",              string, PI[playerid][pWanted]);
    f(string, "%s `wantedtime` = '%d', ",          string, PI[playerid][pWantedTime]);
    f(string, "%s `wantedwho` = '%s', ",           string, PI[playerid][pWantedWho]);
    f(string, "%s `wantedreason` = '%s', ",        string, PI[playerid][pWantedReason]);
    f(string, "%s `heal` = '%f', ",                string, PI[playerid][pHeal]);
    f(string, "%s `drugs` = '%d', ",               string, PI[playerid][pDrugs]);
    f(string, "%s `patron` = '%d', ",              string, PI[playerid][pPatron]);
    f(string, "%s `gunamount` = '%d', ",           string, PI[playerid][pGunAmount]);
    f(string, "%s `crimes` = '%d', ",              string, PI[playerid][pCrimes]);
    f(string, "%s `job` = '%d', ",                 string, PI[playerid][pJob]);
    f(string, "%s `married` = '%d', ",             string, PI[playerid][pMarried]);
    f(string, "%s `whomarried` = '%s', ",          string, PI[playerid][pWhoMarried]);
    f(string, "%s `paycheck` = '%d', ",            string, PI[playerid][pPayCheck]);
    f(string, "%s `charity` = '%d', ",             string, PI[playerid][pCharity]);
    f(string, "%s `vip` = '%d', ",                 string, PI[playerid][pVip]);
    f(string, "%s `viptime` = '%d', ",             string, PI[playerid][pVipTime]);
    f(string, "%s `time` = '%d', ",                string, PI[playerid][pTime]);
    f(string, "%s `fstyle` = '%d', ",              string, PI[playerid][pFightStyle]);
    f(string, "%s `credits` = '%d', ",             string, PI[playerid][pCredits]);
    f(string, "%s `totalcredits` = '%d', ",        string, PI[playerid][pTotalCredits]);
    f(string, "%s `skin1` = '%d', ",               string, PI[playerid][pSkin][0]);
    f(string, "%s `skin2` = '%d', ",               string, PI[playerid][pSkin][1]);
    //f(string, "%s `skin3` = '%s', ",               string, PI[playerid][pName]);
    f(string, "%s `spawnchange` = '%d', ",         string, PI[playerid][pSpawnChange]);
    f(string, "%s `sdpistol` = '%d', ",            string, PI[playerid][pGunSkill][0]);
    f(string, "%s `deserteagle` = '%d', ",         string, PI[playerid][pGunSkill][1]);
    f(string, "%s `shotgun` = '%d', ",             string, PI[playerid][pGunSkill][2]);
    f(string, "%s `mp5` = '%d', ",                 string, PI[playerid][pGunSkill][3]);
    f(string, "%s `ak47` = '%d', ",                string, PI[playerid][pGunSkill][4]);
    f(string, "%s `m4` = '%d', ",                  string, PI[playerid][pGunSkill][5]);
    f(string, "%s `pistol` = '%d', ",              string, PI[playerid][pGunSkill][6]);
    f(string, "%s `microuzi` = '%d', ",            string, PI[playerid][pGunSkill][7]);
    f(string, "%s `hunger` = '%d', ",              string, PI[playerid][pHunger]);
    f(string, "%s `healths` = '%f', ",             string, PI[playerid][pHealthS]);
    f(string, "%s `sportexp` = '%d', ",            string, PI[playerid][pSportExp]);
    f(string, "%s `zakon` = '%d', ",               string, PI[playerid][pZakon]);
    f(string, "%s `city` = '%d', ",                string, PI[playerid][pCity]);
    f(string, "%s `repcar` = '%s', ",              string, PI[playerid][pRepcars]);
    f(string, "%s `bed` = '%d', ",                 string, PI[playerid][pBed]);
    f(string, "%s `watch` = '%d', ",               string, PI[playerid][pWatch]);
    f(string, "%s `ciggare` = '%d', ",             string, PI[playerid][pCiggare]);
    f(string, "%s `sprunk` = '%d', ",              string, PI[playerid][pSprunk]);
    f(string, "%s `mask` = '%d', ",                string, PI[playerid][pMask]);
    f(string, "%s `phonebalance` = '%d', ",        string, PI[playerid][pPhoneBalance]);
    f(string, "%s `truckskill` = '%d', ",          string, PI[playerid][pTruckSkill]);
    //---Àâòîìîáèëè-------------------------------------------------------------
    format(zapros,sizeof(zapros),"%s/%s",cNumberVehicle[playerid][0],cNumberVehicle[playerid][1]);
    f(string, "%s `veh_number` = '%s', ",          string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cModel[playerid][0],cModel[playerid][1]);
    f(string, "%s `cModel` = '%s', ",              string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cClass[playerid][0],cClass[playerid][1]);
    f(string, "%s `cClass` = '%s', ",              string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cFuel[playerid][0],cFuel[playerid][1]);
    f(string, "%s `cFuel` = '%s', ",               string, zapros);
    
    format(zapros,sizeof(zapros),"%f/%f",cMilleage[playerid][0],cMilleage[playerid][1]);
    f(string, "%s `cMilleage` = '%s', ",           string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cColor0[playerid][0], cColor0[playerid][1]);
    f(string, "%s `cColor1` = '%s', ",             string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cColor1[playerid][0], cColor1[playerid][1]);
    f(string, "%s `cColor2` = '%s', ",             string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cLock[playerid][0],cLock[playerid][1]);
    f(string, "%s `cLock` = '%s', ",               string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cCost[playerid][0],cCost[playerid][1]);
    f(string, "%s `cCost` = '%s', ",               string, zapros);
    
    format(cVehcom3[playerid],128,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d/%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
    cVehcoms1[playerid][0], cVehcoms1[playerid][1], cVehcoms1[playerid][2],
    cVehcoms1[playerid][3], cVehcoms1[playerid][4], cVehcoms1[playerid][5],
    cVehcoms1[playerid][6], cVehcoms1[playerid][7], cVehcoms1[playerid][8],
    cVehcoms1[playerid][9], cVehcoms1[playerid][10], cVehcoms1[playerid][11],
    cVehcoms1[playerid][12], cVehcoms1[playerid][13],
    cVehcoms2[playerid][0],cVehcoms2[playerid][1], cVehcoms2[playerid][2],
    cVehcoms2[playerid][3],cVehcoms2[playerid][4], cVehcoms2[playerid][5],
    cVehcoms2[playerid][6],cVehcoms2[playerid][7], cVehcoms2[playerid][8],
    cVehcoms2[playerid][9],cVehcoms2[playerid][10], cVehcoms2[playerid][11],
    cVehcoms2[playerid][12],cVehcoms2[playerid][13]);
    f(string, "%s `cVehcom` = '%s', ",             string, cVehcom3[playerid]);
    
    format(zapros,sizeof(zapros),"%i/%i",cPaintjob[playerid][0],cPaintjob[playerid][1]);
    f(string, "%s `cPaintjob` = '%s', ",           string, zapros);
    
    format(zapros,sizeof(zapros),"%i/%i",cVirtual[playerid][0],cVirtual[playerid][1]);
    f(string, "%s `cVirtual` = '%s', ",            string, zapros);
    
    format(zapros,sizeof(zapros),"%f/%f",CarParkX[playerid][0],CarParkX[playerid][1]);
    f(string, "%s `cX` = '%s', ",                  string, zapros);

    format(zapros,sizeof(zapros),"%f/%f",CarParkY[playerid][0],CarParkY[playerid][1]);
    f(string, "%s `cY` = '%s', ",                  string, zapros);
    
    format(zapros,sizeof(zapros),"%f/%f",CarParkZ[playerid][0],CarParkZ[playerid][1]);
    f(string, "%s `cZ` = '%s', ",                  string, zapros);
    
    format(zapros,sizeof(zapros),"%f/%f",CarParkA[playerid][0],CarParkA[playerid][1]);
    f(string, "%s `cA` = '%s', ",                  string, zapros);
    //--------------------------------------------------------------------------
    f(string, "%s `vehiclekey` = '%d', ",          string, PI[playerid][pVehicleKey][0]);
    f(string, "%s `vehiclekey1` = '%d', ",         string, PI[playerid][pVehicleKey][0]);
    f(string, "%s `aptechka` = '%d', ",            string, PI[playerid][pAptechka]);
    f(string, "%s `Voennik` = '%d', ",             string, PI[playerid][pVoennik]);
    f(string, "%s `music` = '%d', ",               string, PI[playerid][pMusic]);
    f(string, "%s `improves` = '%s', ",            string, PI[playerid][pImproves]);
    f(string, "%s `settings` = '%s', ",            string, PI[playerid][pSettings]);
    f(string, "%s `phnumber1` = '%i', ",           string, PhoneNumbers[playerid][0]);
    f(string, "%s `phnumber2` = '%i', ",           string, PhoneNumbers[playerid][1]);
    f(string, "%s `phnumber3` = '%i', ",           string, PhoneNumbers[playerid][2]);
    f(string, "%s `phnumber4` = '%i', ",           string, PhoneNumbers[playerid][3]);
    f(string, "%s `phnumber5` = '%i', ",           string, PhoneNumbers[playerid][4]);
    f(string, "%s `phnumber6` = '%i', ",           string, PhoneNumbers[playerid][5]);
    f(string, "%s `phnumber7` = '%i', ",           string, PhoneNumbers[playerid][6]);
    //f(string, "%s `fishki` = '%i', ",              string, PI[playerid][pFishkis]);
    f(string, "%s `thour` = '%d', ",               string, PI[playerid][pTimeHour]);
    f(string, "%s `tday` = '%d', ",                string, PI[playerid][pTimeDay]);
    f(string, "%s `tlastday` = '%d', ",            string, PI[playerid][pTimeLastDay]);
    f(string, "%s `balon1` = '%d', ",              string, PI[playerid][pBalon][0]);
    f(string, "%s `balon2` = '%d', ",              string, PI[playerid][pBalon][1]);
    f(string, "%s `balon3` = '%d', ",              string, PI[playerid][pBalon][2]);
    f(string, "%s `balon4` = '%d', ",              string, PI[playerid][pBalon][3]);
    f(string, "%s `balon5` = '%d', ",              string, PI[playerid][pBalon][4]);
    f(string, "%s `balon6` = '%d', ",              string, PI[playerid][pBalon][5]);
    f(string, "%s `balon7` = '%d', ",              string, PI[playerid][pBalon][6]);
    f(string, "%s `remont` = '%d', ",              string, PI[playerid][pRemontNabor]);
    f(string, "%s `sleep` = '%d', ",               string, PI[playerid][pSleep]);
    f(string, "%s `fwarn` = '%d' ",                string, PI[playerid][pfWarn]);
    
    f(string, "%s WHERE `name` = '%s'",            string, PI[playerid][pName]);
    mysql_function_query(dbHandle, string, false, "", "");
    return 1;
}



		

 

 

Я думаю вы мне хоть как то поможете, и не по ленюсь поставить +сик)

Edited by stibs

Share this post


Link to post
Share on other sites

Добрый вечер. 

В mysql_log ошибок никаких нет? 

В конец SaveAccount перед return 1; добавьте: 

printf("%s", string);

Ну а после выдайте себе лидерку и выйдите с сервера через /q и  выложите логи. 

Edited by stibs

Share this post


Link to post
Share on other sites

Вот логи сервера:



----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e, (C)2005-2012 SA-MP Team

[23:09:18] filterscripts = ""  (string)
[23:09:18] 
[23:09:18] Server Plugins
[23:09:18] --------------
[23:09:18]  Loading plugin: AntiDDoS_Guard
[23:09:18]   Failed.
[23:09:18]  Loading plugin: crashdetect
[23:09:18]   CrashDetect v4.15.1 is OK.
[23:09:18]   Loaded.
[23:09:18]  Loading plugin: streamer
[23:09:18] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[23:09:18]   Loaded.
[23:09:18]  Loading plugin: sscanf
[23:09:18] 

[23:09:18]  ===============================

[23:09:18]       sscanf plugin loaded.     

[23:09:18]          Version:  2.8.1        

[23:09:18]    (c) 2012 Alex "Y_Less" Cole  

[23:09:18]  ===============================

[23:09:18]   Loaded.
[23:09:18]  Loading plugin: mysql
[23:09:18]  >> plugin.mysql: R39-5 successfully loaded.
[23:09:18]   Loaded.
[23:09:18]  Loading plugin: CRP
[23:09:18] 

[23:09:18] ______________________________________

[23:09:18]  Convert Rus To Pwn v0.1.1 loaded
[23:09:18] ______________________________________

[23:09:18]  By: Fro (c) Copyright <TBG> 2009-2011
[23:09:18] ______________________________________

[23:09:18]   Loaded.
[23:09:18]  Loading plugin: regex
[23:09:18] 

[23:09:18] ______________________________________

[23:09:18]  Regular Expression Plugin v0.2.1 loaded
[23:09:18] ______________________________________

[23:09:18]  By: Fro (c) Copyright <TBG> 2009-2011
[23:09:18] ______________________________________

[23:09:18]   Loaded.
[23:09:18]  Loading plugin: dc_cmd
[23:09:18]   Daniel's CMD plugin v2.8
[23:09:18]     (c) 2014 Daniel_Cortez
[23:09:18]     www.pro-pawn.ru
[23:09:18]   Loaded.
[23:09:18]  Loaded 7 plugins.

[23:09:18] 
[23:09:18] Ban list
[23:09:18] --------
[23:09:18]  Loaded: samp.ban
[23:09:18] 
[23:09:18] 
[23:09:18] Filterscripts
[23:09:18] ---------------
[23:09:18]   Loaded 0 filterscripts.

[23:09:18]  
[23:09:18]  
[23:09:18]  
[23:09:18]  ======================================= 
[23:09:18]  |                                     | 
[23:09:18]  |        YSI version 3.09.0684        | 
[23:09:18]  |        By Alex "Y_Less" Cole        | 
[23:09:18]  |                                     | 
[23:09:18]  ======================================= 
[23:09:18]  
[23:09:18] [MySQL]: Подключение к базе данных прошло успешно
[23:09:19] Number of vehicle models: 10
[23:09:19] [Загружено орг/раб. автомобилей]: <135>. Потрачено: <5 ms>.
[23:09:19] [Загружено рангов для фракций]: <12>. Потрачено: <2 ms>.
[23:09:19] [Загружено бизнесов]: <2>. Потрачено: <0 ms>.
[23:09:19] [Загружено домов]: <0>. Потрачено: <0 ms>.
[23:09:19] [Загружены склады мафий]: Потрачено: <0 ms>.
[23:09:19] [Загружены склады ОПГ]: Потрачено: <0 ms>.
[23:09:19] [Загружено банкоматов]: <0>. Потрачено: <0 ms>.
[23:09:19] [Загружено остальное]: Потрачено: <0 ms>.
[23:09:19] [Загружено радаров]: <1>. Потрачено: <0 ms>.
[23:09:19] [System Hotels]: 50 hotels successfully loaded
[23:09:47] Incoming connection: 127.0.0.1:51168
[23:09:47] [join] Luka_Lokonte has joined the server (0:127.0.0.1)

А вот логи MySQL


[14:44:05] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `name` = 'Lucas_Destra'' at line 1
[14:46:06] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[14:48:29] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `name` = 'Lucas_Destra'' at line 1
[14:58:08] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[14:58:08] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `name` = 'Lucas_Destra'' at line 1
[18:51:19] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[18:51:19] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `name` = 'Luka_Lokonte'' at line 1
[22:37:39] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[22:38:25] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[22:39:00] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[22:39:42] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[22:40:45] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[23:08:26] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[23:08:49] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[23:09:57] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[23:10:21] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'

И еще, у меня новая проблема, сервер я запускаю на localhost после того как я вставил


printf("%s", string);
	

Я свернул игру, и у меня сам вырубается "samp-server-cr" с "Прекращение работы!" и лидерка так же не сохраняется

 

Share this post


Link to post
Share on other sites

В паблик OnQueryError добавьте: 

printf("[DEBUG]: error: %d, errorname: %s, callback: %s, querystr: %s, connection id: %d", errorid, error, callback, query, connectionHandle);

После этого скомпилируйте мод, запустите samp-server-cr.exe, затем выдайте себе лидерку, выйдите с сервера с помощью /q. И опять скиньте логи. 

Share this post


Link to post
Share on other sites

Эм.. У меня нету такого паблика

Share this post


Link to post
Share on other sites

@FENRIS Значит создайте: 

public OnQueryError(errorid, error[], callback[], query[], connectionHandle)
{
    printf("[DEBUG]: error: %d, errorname: %s, callback: %s, querystr: %s, connection id: %d", errorid, error, callback, query, connectionHandle);
    return true;
}

Т.е. вставьте в любое место мода, главное не в сток / паблик

Edited by stibs

Share this post


Link to post
Share on other sites

Логи сервера:



----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e, (C)2005-2012 SA-MP Team

[23:39:22] filterscripts = ""  (string)
[23:39:22] 
[23:39:22] Server Plugins
[23:39:22] --------------
[23:39:22]  Loading plugin: AntiDDoS_Guard
[23:39:22]   Failed.
[23:39:22]  Loading plugin: crashdetect
[23:39:22]   CrashDetect v4.15.1 is OK.
[23:39:22]   Loaded.
[23:39:22]  Loading plugin: streamer
[23:39:22] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[23:39:22]   Loaded.
[23:39:22]  Loading plugin: sscanf
[23:39:22] 

[23:39:22]  ===============================

[23:39:22]       sscanf plugin loaded.     

[23:39:22]          Version:  2.8.1        

[23:39:22]    (c) 2012 Alex "Y_Less" Cole  

[23:39:22]  ===============================

[23:39:22]   Loaded.
[23:39:22]  Loading plugin: mysql
[23:39:22]  >> plugin.mysql: R39-5 successfully loaded.
[23:39:22]   Loaded.
[23:39:22]  Loading plugin: CRP
[23:39:22] 

[23:39:22] ______________________________________

[23:39:22]  Convert Rus To Pwn v0.1.1 loaded
[23:39:22] ______________________________________

[23:39:22]  By: Fro (c) Copyright <TBG> 2009-2011
[23:39:22] ______________________________________

[23:39:22]   Loaded.
[23:39:22]  Loading plugin: regex
[23:39:22] 

[23:39:22] ______________________________________

[23:39:22]  Regular Expression Plugin v0.2.1 loaded
[23:39:22] ______________________________________

[23:39:22]  By: Fro (c) Copyright <TBG> 2009-2011
[23:39:22] ______________________________________

[23:39:22]   Loaded.
[23:39:22]  Loading plugin: dc_cmd
[23:39:22]   Daniel's CMD plugin v2.8
[23:39:22]     (c) 2014 Daniel_Cortez
[23:39:22]     www.pro-pawn.ru
[23:39:22]   Loaded.
[23:39:22]  Loaded 7 plugins.

[23:39:22] 
[23:39:22] Ban list
[23:39:22] --------
[23:39:22]  Loaded: samp.ban
[23:39:22] 
[23:39:22] 
[23:39:22] Filterscripts
[23:39:22] ---------------
[23:39:22]   Loaded 0 filterscripts.

[23:39:22]  
[23:39:22]  
[23:39:22]  
[23:39:22]  ======================================= 
[23:39:22]  |                                     | 
[23:39:22]  |        YSI version 3.09.0684        | 
[23:39:22]  |        By Alex "Y_Less" Cole        | 
[23:39:22]  |                                     | 
[23:39:22]  ======================================= 
[23:39:22]  
[23:39:22] [MySQL]: Подключение к базе данных прошло успешно
[23:39:22] Number of vehicle models: 10
[23:39:22] [Загружено орг/раб. автомобилей]: <135>. Потрачено: <6 ms>.
[23:39:22] [Загружено рангов для фракций]: <12>. Потрачено: <0 ms>.
[23:39:22] [Загружено бизнесов]: <2>. Потрачено: <1 ms>.
[23:39:22] [Загружено домов]: <0>. Потрачено: <0 ms>.
[23:39:22] [Загружены склады мафий]: Потрачено: <0 ms>.
[23:39:22] [Загружены склады ОПГ]: Потрачено: <0 ms>.
[23:39:22] [Загружено банкоматов]: <0>. Потрачено: <0 ms>.
[23:39:22] [Загружено остальное]: Потрачено: <0 ms>.
[23:39:22] [Загружено радаров]: <1>. Потрачено: <0 ms>.
[23:39:22] [System Hotels]: 50 hotels successfully loaded
[23:39:49] Incoming connection: 127.0.0.1:52556
[23:39:49] [join] Luka_Lokonte has joined the server (0:127.0.0.1)
[23:40:02] [DEBUG]: error: 1054, errorname: Unknown column 'online' in 'field list', callback: , querystr: UPDATE `admin` SET `online` = '1' WHERE name='Luka_Lokonte', connection id: 1

 

Логи MySQL

 


[23:40:02] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[23:40:18] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
 

Share this post


Link to post
Share on other sites

В SaveAccount после строки 

f(string, "%s `leader` = '%d', ",              string, PI[playerid][pLeader]);

добавьте:

printf("%d", PI[playerid][pLeader]);

После опять выдайте лидерку, выйдите с сервера через /q и скиньте логи. 

Share this post


Link to post
Share on other sites



----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e, (C)2005-2012 SA-MP Team

[23:58:23] filterscripts = ""  (string)
[23:58:23] 
[23:58:23] Server Plugins
[23:58:23] --------------
[23:58:23]  Loading plugin: AntiDDoS_Guard
[23:58:23]   Failed.
[23:58:23]  Loading plugin: crashdetect
[23:58:23]   CrashDetect v4.15.1 is OK.
[23:58:23]   Loaded.
[23:58:23]  Loading plugin: streamer
[23:58:23] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[23:58:23]   Loaded.
[23:58:23]  Loading plugin: sscanf
[23:58:23] 

[23:58:23]  ===============================

[23:58:23]       sscanf plugin loaded.     

[23:58:23]          Version:  2.8.1        

[23:58:23]    (c) 2012 Alex "Y_Less" Cole  

[23:58:23]  ===============================

[23:58:23]   Loaded.
[23:58:23]  Loading plugin: mysql
[23:58:23]  >> plugin.mysql: R39-5 successfully loaded.
[23:58:23]   Loaded.
[23:58:23]  Loading plugin: CRP
[23:58:23] 

[23:58:23] ______________________________________

[23:58:23]  Convert Rus To Pwn v0.1.1 loaded
[23:58:23] ______________________________________

[23:58:23]  By: Fro (c) Copyright <TBG> 2009-2011
[23:58:23] ______________________________________

[23:58:23]   Loaded.
[23:58:23]  Loading plugin: regex
[23:58:23] 

[23:58:23] ______________________________________

[23:58:23]  Regular Expression Plugin v0.2.1 loaded
[23:58:23] ______________________________________

[23:58:23]  By: Fro (c) Copyright <TBG> 2009-2011
[23:58:23] ______________________________________

[23:58:23]   Loaded.
[23:58:23]  Loading plugin: dc_cmd
[23:58:23]   Daniel's CMD plugin v2.8
[23:58:23]     (c) 2014 Daniel_Cortez
[23:58:23]     www.pro-pawn.ru
[23:58:23]   Loaded.
[23:58:23]  Loaded 7 plugins.

[23:58:23] 
[23:58:23] Ban list
[23:58:23] --------
[23:58:23]  Loaded: samp.ban
[23:58:23] 
[23:58:23] 
[23:58:23] Filterscripts
[23:58:23] ---------------
[23:58:23]   Loaded 0 filterscripts.

[23:58:23]  
[23:58:23]  
[23:58:23]  
[23:58:23]  ======================================= 
[23:58:23]  |                                     | 
[23:58:23]  |        YSI version 3.09.0684        | 
[23:58:23]  |        By Alex "Y_Less" Cole        | 
[23:58:23]  |                                     | 
[23:58:23]  ======================================= 
[23:58:23]  
[23:58:23] [MySQL]: Подключение к базе данных прошло успешно
[23:58:23] Number of vehicle models: 10
[23:58:24] [Загружено орг/раб. автомобилей]: <135>. Потрачено: <5 ms>.
[23:58:24] [Загружено рангов для фракций]: <12>. Потрачено: <0 ms>.
[23:58:24] [Загружено бизнесов]: <2>. Потрачено: <0 ms>.
[23:58:24] [Загружено домов]: <0>. Потрачено: <0 ms>.
[23:58:24] [Загружены склады мафий]: Потрачено: <0 ms>.
[23:58:24] [Загружены склады ОПГ]: Потрачено: <0 ms>.
[23:58:24] [Загружено банкоматов]: <0>. Потрачено: <0 ms>.
[23:58:24] [Загружено остальное]: Потрачено: <0 ms>.
[23:58:24] [Загружено радаров]: <1>. Потрачено: <0 ms>.
[23:58:24] [System Hotels]: 50 hotels successfully loaded
[23:58:51] Incoming connection: 127.0.0.1:53237
[23:58:52] [join] Luka_Lokonte has joined the server (0:127.0.0.1)
[23:59:03] [DEBUG]: error: 1054, errorname: Unknown column 'online' in 'field list', callback: , querystr: UPDATE `admin` SET `online` = '1' WHERE name='Luka_Lokonte', connection id: 1
[23:59:14] 1
 

[23:59:03] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
[23:59:14] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'online' in 'field list'
 


 

Share this post


Link to post
Share on other sites

В моде "pLeader" в базе "leader"

Share this post


Link to post
Share on other sites

@FENRIS я имею ввиду значение, а не название. Вы скинули название поля, значение пишется под названием. 

Share this post


Link to post
Share on other sites

@stibs "1"

объединено 28.08.2017 0:15: 

@stibs Если я сейчас зайду, то становится "0"

Share this post


Link to post
Share on other sites

@FENRIS Значит проблема с загрузкой. Скидывайте паблик с загрузкой (LoadAccount или LoadAcc или что-то подобное). 

Share this post


Link to post
Share on other sites

@stibs В моде у меня не чего похожего на "LoadAccount" и "LoadAcc " нету.

Share this post


Link to post
Share on other sites

@stibs 


public OnGameModeInit()
{
    gamemodeloaded = 0;
    SetGameModeText("LOADING...");
    
    AddPlayerClass(0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    SetWeather(2);
    new h;
    gettime(h,gCurMinutes,gCurHour);
    SetWorldTime(h);
    SetGravity(0.008);
    ManualVehicleEngineAndLights();
    EnableStuntBonusForAll(0);
    SetNameTagDrawDistance(24.0);
     ShowPlayerMarkers(2);
    DisableInteriorEnterExits();
    
    dbHandle = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
    if(mysql_errno() == -1) print("[MySQL]: Ïîäêëþ÷åíèå ê áàçå äàííûõ ïðîøëî íå óñïåøíî.");
    else print("[MySQL]: Ïîäêëþ÷åíèå ê áàçå äàííûõ ïðîøëî óñïåøíî");
    mysql_log(LOG_WARNING | LOG_ERROR);
    
    mysql_tquery(dbHandle, "SET NAMES 'cp1251'", "", "");
    mysql_tquery(dbHandle, "SET CHARACTER SET 'cp1251'", "", "");
    mysql_set_charset("cp1251", dbHandle);

    mysql_tquery(dbHandle, "SELECT * FROM "T_VEHICLE"", "LoadVeh", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_RANKS"", "LoadRanks", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_BIZZ" ORDER BY  "T_BIZZ".`id` ASC ", "LoadBizz", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_HOUSE" ORDER BY  "T_HOUSE".`id` ASC ", "LoadHouse", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_MAFIA"", "LoadMafia", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_OPG"", "LoadOPG", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_ATM"", "LoadATM", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_OTHER"", "LoadOther", "");
    mysql_tquery(dbHandle, "SELECT * FROM "T_RADAR"", "LoadRadar", "");

    if(getDayEx()==2) mysql_tquery(dbHandle, "UPDATE "T_ADMIN" SET `online_monday`='0',`online_tuesday`='0',`online_wednesday`='0',`online_thursday`='0',`online_friday`='0',`online_saturday`='0',`online_sunday`='0'", "", "");

    SendRconCommand("mapname "SERVER_MAP"");
    SendRconCommand("weburl "SERVER_WEBSITE"");
    
    CreateObject(2168,2747.34448242,-1142.90002441,21.60000038,0.00000000,0.00000000,180.00000000);
    CreateObject(2168,2747.30004883,-1262.00000000,21.60000038,0.00000000,0.00000000,0.00000000);
    
    //Èêîíêè îðãàíèçàöèé íà êàðòå
    CreateDynamicMapIcon(1907.1963,-2231.2732,11.5808, 19, 0xFFFFFFFF); // Ìýðèÿ
    CreateDynamicMapIcon(208.1147,1472.9060,12.2000, 30, 0xFFFFFFFF); // Ïîëèöèÿ
    CreateDynamicMapIcon(2579.0457,-2415.7400,21.9888, 30, 0xFFFFFFFF); // ÄÏÑ
    CreateDynamicMapIcon(2412.2146,-1843.5712,22.2745, 30, 0xFFFFFFFF); // ÔÑÁ
    CreateDynamicMapIcon(-286.6216,579.4940,12.8447, 22, 0xFFFFFFFF); // Áîëüíèöà
    CreateDynamicMapIcon(2489.0703,-977.2718,2.3712, 36, 0xFFFFFFFF); // Àâòîøêîëà
    CreateDynamicMapIcon(2122.5476,-1794.0294,19.9079, 44, 0xFFFFFFFF); // Èòàëüÿíñêàÿ Ìàôèÿ
    CreateDynamicMapIcon(1294.2133,-295.5184,4.3389, 6, 0xFFFFFFFF); // Àðìèÿ
    CreateDynamicMapIcon(1632.9701,-278.9748,4.0025, 43, 0xFFFFFFFF); // ÎÏÃ Îðåõîâñêîå
    CreateDynamicMapIcon(1940.4950,2160.6511,15.7060, 43, 0xFFFFFFFF); // ÎÏÃ ÑÎëíöåâñêîå
    CreateDynamicMapIcon(-2249.4431,-92.7597,26.2765, 44, 0xFFFFFFFF); // Ðóññêàÿ Ìàôèÿ
    CreateDynamicMapIcon(-2068.0276,-198.9918,26.0098, 60, 0xFFFFFFFF); // ÑÌÈ
    
    CreateDynamicMapIcon(-1496.8129,1621.5154,36.3659, 53, 0xFFFFFFFF); // Ãîíî÷íûé Òðåê
    
    //Äâåðè, âîðîòà
    CreateObject(19313, 1289.68, -293.87, 10.03,   0.00, 0.00, 90.00);
    CopDver = CreateObject(1569, 894.25, 2097.70, 2720.79,   0.00, 0.00, -90.00);
    openvdv = CreateObject(975, 1289.74, -295.04, 5.01,   0.00, 0.00, 270.00);
    
    //============================= [Äâåðè íà êíîïêó] ========================//
    GateCop = CreateObject(3089, 2195.93, -1701.49, -20.84,   0.00, 0.00, 90.00);//çàêðûòûå
    //========================================================================//
    
    openfsb2 = CreateObject(1717, 2394.78, -1792.45, 22.76,   0.00, 0.00, 90.00);
    openfsb1 = CreateObject(1717, 2445.63, -1795.08, 22.76,   0.00, 0.00, 0.00);
    
    CreateObject(1569, 2575.77, -2416.80, 21.44,   0.00, 0.00, 90.00);
    opendps = CreateObject(968, 2579.58, -2431.99, 21.44,   0.00, -90.00, 90.00);
    CreateObject(966, 2579.59, -2432.01, 20.61,   0.00, 0.00, 90.00);
    //
    LoadTextDraws();
    LoadPickups();
    LoadObject();
    LoadHotel();
    Menu();
    
    second_timer = SetTimer("SecTimer", 1000, true);
    player_timer = SetTimer("PlayerTimer", 1000, true);
    SetTimer("SetRandomWeather", 7200, false);
    //update_speed = SetTimer("UpdateSpeedometr", 1000, true);
    for(new i; i < MAX_PLAYERS; i++) Potr1[i] = CreateProgressBar(506.00, 147.00, 71.50, 4.19, -2139062170, 100.0),Potr2[i] = CreateProgressBar(506.00, 157.00, 71.50, 4.19, -2139062170, 100.0);
    /* ---------------------------------------------------------------------- */
    for(new i; i != MAX_VEHICLES; i ++)
    {
        AdminVehicle[i] = INVALID_VEHICLE_ID;
        if(!IsValidVehicle(i)) continue;
        SetVehicleParamsEx(i, false, false, false, false, false, false, false);
        Engine[i] = Lights[i] = false;
        Fuel[i] = 150,lcars[i] = false;
    }
    lastveh = CreateVehicle(542,0,0,0,0,0,0,0);
    DestroyVehicle(lastveh);

    SetGameModeText(SERVER_VERSION);
    gamemodeloaded = 1;
    
    return 1;
}

Edited by stibs

Share this post


Link to post
Share on other sites

@stibs Вот:

public OnPlayerLogin(playerid, tmp[])
{
    new query[128],zapros[128];
       mysql_format(dbHandle, query, sizeof(query), "SELECT * FROM bans WHERE name = '%e'", GetName(playerid));
    mysql_tquery(dbHandle, query, "check_banlist", "i", playerid);
    
    if(!GetPVarInt(playerid, "Logged")) return 1;
    
    PI[playerid][pID] = cache_get_row_int(0, 0, dbHandle); // id
    //cache_get_row(0, 2, PI[playerid][pPassword], dbHandle, 32); // password
    cache_get_row(0, 3, PI[playerid][pLastIP], dbHandle, 16); // ip
    PI[playerid][pAdmin] = cache_get_row_int(0, 4, dbHandle); // admin
    PI[playerid][pSecurityCode] = cache_get_row_int(0, 5, dbHandle); // securitycode
    PI[playerid][pCheckCode] = cache_get_row_int(0, 6, dbHandle); // checkcode
    cache_get_row(0, 7, PI[playerid][pMail], dbHandle, 64); // mail
    PI[playerid][pLevel] = cache_get_row_int(0, 8, dbHandle); // level
    PI[playerid][pCash] = cache_get_row_int(0, 9, dbHandle); // cash
    PI[playerid][pBank] = cache_get_row_int(0, 10, dbHandle); // bank
    PI[playerid][pExp] = cache_get_row_int(0, 11, dbHandle); // exp
    cache_get_row(0, 12, PI[playerid][pRegIP], dbHandle, 16); // regip
    cache_get_row(0, 13, PI[playerid][pRegData], dbHandle, 16); // datareg
    PI[playerid][pLeader] = cache_get_row_int(0, 14, dbHandle); // leader
    PI[playerid][pTempLeader] = cache_get_row_int(0, 15, dbHandle); // templeader
    PI[playerid][pMember] = cache_get_row_int(0, 16, dbHandle); // member
    PI[playerid][pRank] = cache_get_row_int(0, 17, dbHandle); // rank
    PI[playerid][pWarn] = cache_get_row_int(0, 18, dbHandle); // warn
    PI[playerid][pSex] = cache_get_row_int(0, 19, dbHandle); // sex
    PI[playerid][pAge] = cache_get_row_int(0, 20, dbHandle); // age
    //PI[playerid][pModel] = cache_get_row_int(0, 21, dbHandle); // model
    PI[playerid][pMemberSkin] = cache_get_row_int(0, 22, dbHandle); // memberskin
    cache_get_row(0, 23, PI[playerid][pLics], dbHandle, 16); // lic
    PI[playerid][pMuted] = cache_get_row_int(0, 26, dbHandle); // mute
    PI[playerid][pPick] = cache_get_row_int(0, 27, dbHandle); // pick
    PI[playerid][pCheckTime] = cache_get_row_int(0, 28, dbHandle); //checktime
    PI[playerid][pNews] = cache_get_row_int(0, 29, dbHandle); // news
    //PI[playerid][pPhone] = cache_get_row_int(0, 30, dbHandle); // phone
    PI[playerid][pPhoneNumber] = cache_get_row_int(0, 31, dbHandle); // phonenumber
    cache_get_row(0, 32, PI[playerid][pTexts], dbHandle, 32); // text
    PI[playerid][pJail] = cache_get_row_int(0, 33, dbHandle); // jail
    PI[playerid][pJailTime] = cache_get_row_int(0, 34, dbHandle); // jailtime
    PI[playerid][pWanted] = cache_get_row_int(0, 35, dbHandle); // wanted
    PI[playerid][pWantedTime] = cache_get_row_int(0, 36, dbHandle); // wantedtime
    cache_get_row(0, 37, PI[playerid][pWantedWho], dbHandle, MAX_PLAYER_NAME); // wantedwho
    cache_get_row(0, 38, PI[playerid][pWantedReason], dbHandle, 32); // wantedreason
    PI[playerid][pHeal] = cache_get_row_float(0, 39, dbHandle); // heal
    PI[playerid][pDrugs] = cache_get_row_int(0, 40, dbHandle); // drugs
    PI[playerid][pPatron] = cache_get_row_int(0, 41, dbHandle); // patron
    PI[playerid][pGunAmount] = cache_get_row_int(0, 42, dbHandle); // gunamount
    PI[playerid][pCrimes] = cache_get_row_int(0, 43, dbHandle); // crimes
    PI[playerid][pJob] = cache_get_row_int(0, 44, dbHandle); // job
    PI[playerid][pMarried] = cache_get_row_int(0, 45, dbHandle); // married
    cache_get_row(0, 46, PI[playerid][pWhoMarried], dbHandle, MAX_PLAYER_NAME); // whomarried
    cache_get_row(0, 47, PI[playerid][pReferal], dbHandle, MAX_PLAYER_NAME); // referal
    PI[playerid][pRefMoney] = cache_get_row_int(0, 48, dbHandle); // refmoney
    PI[playerid][pPayCheck] = cache_get_row_int(0, 49, dbHandle); // paycheck
    PI[playerid][pCharity] = cache_get_row_int(0, 50, dbHandle); // charity
    PI[playerid][pVip] = cache_get_row_int(0, 51, dbHandle); // vip
    PI[playerid][pVipTime] = cache_get_row_int(0, 52, dbHandle); // viptime
    PI[playerid][pTime] = cache_get_row_int(0, 53, dbHandle); // time
    PI[playerid][pFightStyle] = cache_get_row_int(0, 54, dbHandle); // fstyle
    PI[playerid][pCredits] = cache_get_row_int(0, 55, dbHandle); // credits
    PI[playerid][pTotalCredits] = cache_get_row_int(0, 56, dbHandle); // totalcredits
    PI[playerid][pSkin][0] = cache_get_row_int(0, 57, dbHandle); // skin1
    PI[playerid][pSkin][1] = cache_get_row_int(0, 58, dbHandle); // skin2
    PI[playerid][pSkin][2] = cache_get_row_int(0, 59, dbHandle); // skin3
    PI[playerid][pSpawnChange] = cache_get_row_int(0, 60, dbHandle); // spawnchange
    PI[playerid][pGunSkill][0] = cache_get_row_int(0, 61, dbHandle); // sdpistol
    PI[playerid][pGunSkill][1] = cache_get_row_int(0, 62, dbHandle); // deserteagle
    PI[playerid][pGunSkill][2] = cache_get_row_int(0, 63, dbHandle); // shotgun
    PI[playerid][pGunSkill][3] = cache_get_row_int(0, 64, dbHandle); // mp5
    PI[playerid][pGunSkill][4] = cache_get_row_int(0, 65, dbHandle); // ak47
    PI[playerid][pGunSkill][5] = cache_get_row_int(0, 66, dbHandle); // m4
    PI[playerid][pGunSkill][6] = cache_get_row_int(0, 67, dbHandle); // pistol
    PI[playerid][pGunSkill][7] = cache_get_row_int(0, 68, dbHandle); // microuzi
    PI[playerid][pHunger] = cache_get_row_int(0, 69, dbHandle); // hunger
    PI[playerid][pHealthS] = cache_get_row_int(0, 70, dbHandle); // healths
    PI[playerid][pSportExp] = cache_get_row_int(0, 71, dbHandle); // sportexp
    PI[playerid][pZakon] = cache_get_row_int(0, 73, dbHandle); // zakon
    PI[playerid][pCity] = cache_get_row_int(0, 74, dbHandle); // city
    cache_get_row(0, 75, PI[playerid][pRepcars], dbHandle, 16); // repcar
    PI[playerid][pBed] = cache_get_row_int(0, 76, dbHandle); // bed
    PI[playerid][pWatch] = cache_get_row_int(0, 77, dbHandle); // watch
    PI[playerid][pCiggare] = cache_get_row_int(0, 78, dbHandle); // ciggare
    PI[playerid][pSprunk] = cache_get_row_int(0, 79, dbHandle); // sprunk
    PI[playerid][pMask] = cache_get_row_int(0, 80, dbHandle); // mask
    PI[playerid][pPhoneBalance] = cache_get_row_int(0, 81, dbHandle); // phonebalance
    PI[playerid][pTruckSkill] = cache_get_row_int(0, 82, dbHandle); // truckskill
    //--------------------------------------------------------------------------
    cache_get_row(0, 83, zapros, dbHandle, 128);
    sscanf(zapros, "p</>s[64]s[64]", cNumberVehicle[playerid][0],cNumberVehicle[playerid][1]);
    
    cache_get_row(0, 84, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cModel[playerid][0],cModel[playerid][1]);
    
    cache_get_row(0, 85, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cClass[playerid][0],cClass[playerid][1]);
    
    cache_get_row(0, 86, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cFuel[playerid][0],cFuel[playerid][1]);
    
    cache_get_row(0, 87, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ff", cMilleage[playerid][0],cMilleage[playerid][1]);
    
    cache_get_row(0, 88, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cColor0[playerid][0],cColor0[playerid][1]);
    
    cache_get_row(0, 89, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cColor1[playerid][0],cColor1[playerid][1]);
    
    cache_get_row(0, 90, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cLock[playerid][0],cLock[playerid][1]);
    
    cache_get_row(0, 91, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cCost[playerid][0],cCost[playerid][1]);
    
    cache_get_row(0, 92, cVehcom3[playerid], dbHandle, 128);
    sscanf(cVehcom3[playerid], "p</>a<i>[14]a<i>[14]", cVehcoms1[playerid],cVehcoms2[playerid]);
    
    cache_get_row(0, 93, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cPaintjob[playerid][0],cPaintjob[playerid][1]);
    
    cache_get_row(0, 94, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ii", cVirtual[playerid][0],cVirtual[playerid][1]);
    
    cache_get_row(0, 95, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ff", CarParkX[playerid][0],CarParkX[playerid][1]);
    
    cache_get_row(0, 96, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ff", CarParkY[playerid][0],CarParkY[playerid][1]);
    
    cache_get_row(0, 97, zapros, dbHandle, 64);
    sscanf(zapros, "p</>ff", CarParkZ[playerid][0],CarParkZ[playerid][1]);
    
    cache_get_row(0, 98, zapros, 64);
    sscanf(zapros, "p</>ff", CarParkA[playerid][0],CarParkA[playerid][1]);
    //--------------------------------------------------------------------------
    PI[playerid][pVehicleKey][0] = cache_get_row_int(0, 99, dbHandle); // cPaintjob
    PI[playerid][pVehicleKey][1] = cache_get_row_int(0, 100, dbHandle); // cPaintjob
    
    PI[playerid][pAptechka] = cache_get_row_int(0, 101, dbHandle); // aptechka
    PI[playerid][pVoennik] = cache_get_row_int(0, 102, dbHandle); // Voennik
    PI[playerid][pMusic] = cache_get_row_int(0, 103, dbHandle); // music
    cache_get_row(0, 104, PI[playerid][pImproves], dbHandle, 32); // improves
    cache_get_row(0, 106, PI[playerid][pSettings], dbHandle, 16); // settings
    PhoneNumbers[playerid][0] = cache_get_row_int(0, 107, dbHandle); // phnumber1
    PhoneNumbers[playerid][1] = cache_get_row_int(0, 108, dbHandle); // phnumber2
    PhoneNumbers[playerid][2] = cache_get_row_int(0, 109, dbHandle); // phnumber3
    PhoneNumbers[playerid][3] = cache_get_row_int(0, 110, dbHandle); // phnumber4
    PhoneNumbers[playerid][4] = cache_get_row_int(0, 111, dbHandle); // phnumber5
    PhoneNumbers[playerid][5] = cache_get_row_int(0, 112, dbHandle); // phnumber6
    PhoneNumbers[playerid][6] = cache_get_row_int(0, 113, dbHandle); // phnumber7
    PhoneNumbers[playerid][7] = cache_get_row_int(0, 114, dbHandle); // phnumber8
    PI[playerid][pMailConfirmed] = cache_get_row_int(0, 115, dbHandle); // mailconf
    PI[playerid][pFishkis] = cache_get_row_int(0, 116, dbHandle); // fishki
    PI[playerid][pTimeHour] = cache_get_row_int(0, 117, dbHandle); // 
    PI[playerid][pTimeDay] = cache_get_row_int(0, 118, dbHandle); // 
    PI[playerid][pTimeLastDay] = cache_get_row_int(0, 119, dbHandle); // 
    PI[playerid][pBalon][0] = cache_get_row_int(0, 120, dbHandle);
    PI[playerid][pBalon][1] = cache_get_row_int(0, 121, dbHandle);
    PI[playerid][pBalon][2] = cache_get_row_int(0, 122, dbHandle);
    PI[playerid][pBalon][3] = cache_get_row_int(0, 123, dbHandle);
    PI[playerid][pBalon][4] = cache_get_row_int(0, 124, dbHandle);
    PI[playerid][pBalon][5] = cache_get_row_int(0, 125, dbHandle);
    PI[playerid][pBalon][6] = cache_get_row_int(0, 126, dbHandle);
    PI[playerid][pRemontNabor] = cache_get_row_int(0, 127, dbHandle);
    PI[playerid][pSleep] = cache_get_row_int(0, 129, dbHandle); // Sleep
    
    PI[playerid][pVipChangeCar] = cache_get_row_int(0, 133, dbHandle); //
    PI[playerid][pSellSim] = cache_get_row_int(0, 134, dbHandle); //
    PI[playerid][pfWarn] = cache_get_row_int(0, 135, dbHandle); // warn
    
    if(PI[playerid][pAdmin] > 0)
    {
        new Query[128];
        format(Query, sizeof(Query), "UPDATE "T_ADMIN" SET `online` = '1' WHERE name='%s'", GetName(playerid));
        mysql_tquery(dbHandle, Query, "", "");
        AdminInfo[playerid][admOnline] = 1;
    }
    
    PI[playerid][pOnline] = 1,MysqlUpdatePlayerInt(playerid, "online", PI[playerid][pOnline]);
    
    new l_guns[56], l_ammo[56];
    cache_get_row(0, 24, l_guns, dbHandle, 64); // guns
    cache_get_row(0, 25, l_ammo, dbHandle, 64); // ammos

    new g_data[13], a_data[13];
    sscanf(l_guns, "p<,>a<i>[13]", g_data);
    sscanf(l_ammo, "p<,>a<i>[13]", a_data);
    
    for(new i; i < 13; i++)
    {
        PI[playerid][pGun][i] = g_data[i];
        PI[playerid][pAmmo][i] = a_data[i];
    }
    SetPVarInt(playerid, "Connected", 1);
        
    sscanf(PI[playerid][pTexts], "p<,>a<i>[4]", PI[playerid][pText]);
    sscanf(PI[playerid][pRepcars], "p<,>a<i>[2]", PI[playerid][pRepcar]);
    sscanf(PI[playerid][pImproves], "p<,>a<i>[4]", PI[playerid][pImprove]);
    sscanf(PI[playerid][pLics], "p<,>a<i>[4]",PI[playerid][pLic]);
    sscanf(PI[playerid][pSettings], "p<,>a<i>[7]",PI[playerid][pSetting]);
    
    DeletePVar(playerid, "Logged");
    DeletePVar(playerid, "avttimer");

    GetPlayerIp(playerid, PI[playerid][pIP], 16);
    format(query, 256, "UPDATE "T_ACCOUNTS" SET ip = '%s',datavhod = CURDATE() WHERE name = '%s' LIMIT 1", PI[playerid][pIP], PI[playerid][pName]);
    mysql_tquery(dbHandle, query, "", "");
    OnLoadPass(playerid);
    
    if(PI[playerid][pTempLeader] != 0)
    {
        LeaveFractionPlayer(playerid);
        PI[playerid][pTempLeader] = 0;
    }
    
    if(PI[playerid][pMember] != 0 && PI[playerid][pAdmin] != 0)
    {
        LeaveFractionPlayer(playerid);
        SCM(playerid,COLOR_GREY,"Нельзя находится в организации в момент администратирования.");
    }
    
    if(PI[playerid][pfWarn] >= 3)
    {
        if(PI[playerid][pLeader]) SCM(playerid,COLOR_RED,"Вы были сняты с лидерского поста из за 3-ёх выговоров!");
        else SCM(playerid,COLOR_RED,"Вы были уволены из организации из за 3-ёх выгоров!");
        LeaveFractionPlayer(playerid);
    }
    
    if(PI[playerid][pCheckCode] == 1)
    {
        new texter_pas[5];
        new digitsd[9] = {1,2,3,4,5,6,7,8,9};
        for(new i, rand, old_digit; i < 9; i++)
        {
            while((rand = random(9)) == i) {}
            old_digit = digitsd[i];
            digitsd[i] = digitsd[rand];
            digitsd[rand] = old_digit;
        }
        for(new f = 0; f < 10; f++)
        {
            if(f < 9)
            {
                mass_pass[playerid][f] = digitsd[f];
                format(texter_pas,sizeof(texter_pas),"%i",mass_pass[playerid][f]);
                PlayerTextDrawSetString(playerid,SecurityCode[playerid][f],texter_pas);
            }
            PlayerTextDrawShow(playerid,SecurityCode[playerid][f]);
        }
        SCM(playerid, COLOR_WHITE, "Система безопасности запрашивает ввод Вашего графического пароля");
        PI[playerid][pInputCode] = 0;
        Ujahhs[playerid] = 1;
        SelectTextDrawEx(playerid, -264092161);
    }
    else if(PI[playerid][pCheckCode] == 2)
    {
        if(!strcmp(PI[playerid][pLastIP],PI[playerid][pIP],true))
        {
            PlayerLogged[playerid] = true;
            cmd_alogin(playerid);
            //Hunger(playerid, 0);
               SpawnPlayer(playerid);
        }
        else
        {
            new texter_pas[5];
            new digitsd[9] = {1,2,3,4,5,6,7,8,9};
            for(new i, rand, old_digit; i < 9; i++)
            {
                while((rand = random(9)) == i) {}
                old_digit = digitsd[i];
                digitsd[i] = digitsd[rand];
                digitsd[rand] = old_digit;
            }
            for(new f = 0; f < 10; f++)
            {
                if(f < 9)
                {
                    mass_pass[playerid][f] = digitsd[f];
                    format(texter_pas,sizeof(texter_pas),"%i",mass_pass[playerid][f]);
                    PlayerTextDrawSetString(playerid,SecurityCode[playerid][f],texter_pas);
                }
                PlayerTextDrawShow(playerid,SecurityCode[playerid][f]);
            }
            SCM(playerid, COLOR_WHITE, "Система безопасности запрашивает ввод Вашего графического пароля");
            PI[playerid][pInputCode] = 0;
            Ujahhs[playerid] = 1;
            SelectTextDrawEx(playerid,-264092161);
        }
    }
    else if(PI[playerid][pCheckCode] == 3)
    {
        new strv[26], strvv[26], splitt[4][4], spli[4][4];
        split(PI[playerid][pLastIP], splitt, '.');
        format(strv, sizeof(strv), "%s.%s", splitt[0], splitt[1]);
        split(PI[playerid][pIP], spli, '.');
        format(strvv, sizeof(strvv), "%s.%s", spli[0], spli[1]);
        if(strcmp(strv,strvv,true))
        {
            new texter_pas[5];
            new digitsd[9] = {1,2,3,4,5,6,7,8,9};
            for(new i, rand, old_digit; i < 9; i++)
            {
                while((rand = random(9)) == i) {}
                old_digit = digitsd[i];
                digitsd[i] = digitsd[rand];
                digitsd[rand] = old_digit;
            }
            for(new f = 0; f < 10; f++)
            {
                if(f < 9)
                {
                    mass_pass[playerid][f] = digitsd[f];
                    format(texter_pas,sizeof(texter_pas),"%i",mass_pass[playerid][f]);
                    PlayerTextDrawSetString(playerid,SecurityCode[playerid][f],texter_pas);
                }
                PlayerTextDrawShow(playerid,SecurityCode[playerid][f]);
            }
            SCM(playerid, COLOR_WHITE, "Система безопасности запрашивает ввод Вашего графического пароля");
            PI[playerid][pInputCode] = 0;
            Ujahhs[playerid] = 1;
            SelectTextDrawEx(playerid,-264092161);
        }
        else
        {
            //if(!PI[playerid][pMailConfirmed] && PI[playerid][pLevel] < 3) SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Ваша почта не привязана. Привяжите её, чтобы потвердить ваш аккаунт (/menu - Безопасность)");
            PlayerLogged[playerid] = true;
            cmd_alogin(playerid);
            //Hunger(playerid, 0);
               SpawnPlayer(playerid);
        }
    }
    else
    {
        if(PI[playerid][pLevel] < 3) SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Если вы хотите полностью обезопасить свой аккаунт (/menu - Безопасность)");
        //if(!PI[playerid][pMailConfirmed] && PI[playerid][pLevel] < 3) SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Ваша почта не привязана. Привяжите её, чтобы потвердить ваш аккаунт (/menu - Безопасность)");
        PlayerLogged[playerid] = true;
        cmd_alogin(playerid);
        //Hunger(playerid, 0);
        SpawnPlayer(playerid);
    }
    
    if(Pick == 1)
    {
        SendClientMessageToAll(COLOR_WHITE, "Сегодня проходят выборы Мэра!");
        SendClientMessageToAll(COLOR_WHITE, "Голосование проходит в Мэрии Лос-Сантоса на первом этаже. Сделайте свой выбор.");
    }
    
    if(doubling_exp && !doubling_donate)
        SCM(playerid, COLOR_LIME, "Внимание! Сегодня действует двойной опыт каждый час!");
    else if(doubling_donate && !doubling_exp)
        SCM(playerid, COLOR_LIME, "Внимание! Сегодня действует удвоенный курс обмена донат-валюты в игровую!");
    else if(doubling_donate && doubling_exp)
        SCM(playerid, COLOR_LIME, "Внимание! Сегодня действует двойной опыт каждый час и удвоенный курс обмена донат-валюты в игровую!");
        
    if(PI[playerid][pText][0] == 1)
    {
        new i = PI[playerid][pText][0];
        PI[playerid][pBank] += HouseInfo[i][hPrice];
        SendMes(playerid, COLOR_YELLOW, "[Квитанция] Вы были выселены за неуплату! Вам было возвращено %d руб", HouseInfo[i][hPrice]);
        SCM(playerid, COLOR_YELLOW, "[Квитанция] Деньги были переведены на ваш банковский счет.");
        format(PI[playerid][pTexts], 20,  "0, %i, %i, %i", PI[playerid][pText][1], PI[playerid][pText][2], PI[playerid][pText][3]);
        format(query, 256, "UPDATE "T_ACCOUNTS" SET text = '%s' WHERE name = '%s'", PI[playerid][pTexts], GetName(playerid));
        mysql_tquery(dbHandle, query, "", "");
    }
    if(PI[playerid][pText][1] == 1)
    {
        SCM(playerid, COLOR_YELLOW, "[Налоговая служба] Ваш бизнес закрыли в связи с нехваткой ресурсов");
        SCM(playerid, COLOR_YELLOW, "[Налоговая служба] Бюджет бизнеса зачислен на ваш банковский счет");
        format(PI[playerid][pTexts], 20, "%i, 0, %i, %i", PI[playerid][pText][0], PI[playerid][pText][2], PI[playerid][pText][3]);
        format(query, 256, "UPDATE "T_ACCOUNTS" SET text = '%s' WHERE name = '%s'", PI[playerid][pTexts], GetName(playerid));
        mysql_tquery(dbHandle, query, "", "");
    }
    if(PI[playerid][pText][2] == 1)
    {
        TransferMoney(-1, playerid, 100000);
        SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}Вы получили 100000 руб за приглашенного игрока");
        PI[playerid][pRefMoney] = 0;
        format(PI[playerid][pTexts], 20, "%i, %i, 0, %i", PI[playerid][pText][0], PI[playerid][pText][1], PI[playerid][pText][3]);
        format(query, 256, "UPDATE "T_ACCOUNTS" SET text = '%s', refmoney = %d WHERE name = '%s'", PI[playerid][pTexts], PI[playerid][pRefMoney], GetName(playerid));
        mysql_tquery(dbHandle, query, "", "");
    }
    if(PI[playerid][pText][3] == 1)
    {
        SCM(playerid, COLOR_YELLOW, "[Информация] {FFFFFF}На ваш счёт поступил донат платёж (/donate - Проверить зачисления)");
        format(PI[playerid][pTexts], 20, "%i, %i, %i, 0", PI[playerid][pText][0], PI[playerid][pText][1], PI[playerid][pText][2]);
        format(query, 256, "UPDATE "T_ACCOUNTS" SET text = '%s' WHERE name = '%s'", PI[playerid][pTexts], GetName(playerid));
        mysql_tquery(dbHandle, query, "", "");
    }
    
    if(PI[playerid][pVipTime] > 0)
    {
        new year, month, day;
        new current_date = getdate(year, month, day);
        new time_left = PI[playerid][pVipTime] - current_date;
        if(time_left <= 0)
        {
            SCM(playerid, COLOR_YELLOW, "Срок действия вашего VIP аккаунта истек!");
            PI[playerid][pVip] = PI[playerid][pVipTime] = 0;
        }
    }
    return 1;
}

Edited by stibs

Share this post


Link to post
Share on other sites

после этой строчки

PI[playerid][pLeader] = cache_get_row_int(0, 14, dbHandle); // leader

добавьте это:

printf("login leader = %d", PI[playerid][pLeader]);

Потом выдайте себе лидерку, выйдите с сервера через /q, зайдите опять и скиньте логи. 

Edited by stibs

Share this post


Link to post
Share on other sites

@stibs 



----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e, (C)2005-2012 SA-MP Team

[00:36:53] filterscripts = ""  (string)
[00:36:53] 
[00:36:53] Server Plugins
[00:36:53] --------------
[00:36:53]  Loading plugin: AntiDDoS_Guard
[00:36:53]   Failed.
[00:36:53]  Loading plugin: crashdetect
[00:36:53]   CrashDetect v4.15.1 is OK.
[00:36:53]   Loaded.
[00:36:53]  Loading plugin: streamer
[00:36:53] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[00:36:53]   Loaded.
[00:36:53]  Loading plugin: sscanf
[00:36:53] 

[00:36:53]  ===============================

[00:36:53]       sscanf plugin loaded.     

[00:36:53]          Version:  2.8.1        

[00:36:53]    (c) 2012 Alex "Y_Less" Cole  

[00:36:53]  ===============================

[00:36:53]   Loaded.
[00:36:53]  Loading plugin: mysql
[00:36:53]  >> plugin.mysql: R39-5 successfully loaded.
[00:36:53]   Loaded.
[00:36:53]  Loading plugin: CRP
[00:36:53] 

[00:36:53] ______________________________________

[00:36:53]  Convert Rus To Pwn v0.1.1 loaded
[00:36:53] ______________________________________

[00:36:53]  By: Fro (c) Copyright <TBG> 2009-2011
[00:36:53] ______________________________________

[00:36:53]   Loaded.
[00:36:53]  Loading plugin: regex
[00:36:53] 

[00:36:53] ______________________________________

[00:36:53]  Regular Expression Plugin v0.2.1 loaded
[00:36:53] ______________________________________

[00:36:53]  By: Fro (c) Copyright <TBG> 2009-2011
[00:36:53] ______________________________________

[00:36:53]   Loaded.
[00:36:53]  Loading plugin: dc_cmd
[00:36:53]   Daniel's CMD plugin v2.8
[00:36:53]     (c) 2014 Daniel_Cortez
[00:36:53]     www.pro-pawn.ru
[00:36:53]   Loaded.
[00:36:53]  Loaded 7 plugins.

[00:36:53] 
[00:36:53] Ban list
[00:36:53] --------
[00:36:53]  Loaded: samp.ban
[00:36:53] 
[00:36:53] 
[00:36:53] Filterscripts
[00:36:53] ---------------
[00:36:53]   Loaded 0 filterscripts.

[00:36:54]  
[00:36:54]  
[00:36:54]  
[00:36:54]  ======================================= 
[00:36:54]  |                                     | 
[00:36:54]  |        YSI version 3.09.0684        | 
[00:36:54]  |        By Alex "Y_Less" Cole        | 
[00:36:54]  |                                     | 
[00:36:54]  ======================================= 
[00:36:54]  
[00:36:54] [MySQL]: Подключение к базе данных прошло успешно
[00:36:54] Number of vehicle models: 10
[00:36:54] [Загружено орг/раб. автомобилей]: <135>. Потрачено: <5 ms>.
[00:36:54] [Загружено рангов для фракций]: <12>. Потрачено: <0 ms>.
[00:36:54] [Загружено бизнесов]: <2>. Потрачено: <1 ms>.
[00:36:54] [Загружено домов]: <0>. Потрачено: <0 ms>.
[00:36:54] [Загружены склады мафий]: Потрачено: <0 ms>.
[00:36:54] [Загружены склады ОПГ]: Потрачено: <0 ms>.
[00:36:54] [Загружено банкоматов]: <0>. Потрачено: <0 ms>.
[00:36:54] [Загружено остальное]: Потрачено: <0 ms>.
[00:36:54] [Загружено радаров]: <1>. Потрачено: <0 ms>.
[00:36:54] [System Hotels]: 50 hotels successfully loaded
[00:37:20] Incoming connection: 127.0.0.1:64546
[00:37:20] [join] Luka_Lokonte has joined the server (0:127.0.0.1)
[00:37:31] login leader = 1
[00:37:31] [DEBUG]: error: 1054, errorname: Unknown column 'online' in 'field list', callback: , querystr: UPDATE `admin` SET `online` = '1' WHERE name='Luka_Lokonte', connection id: 1
[00:37:43] 1

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3e, (C)2005-2012 SA-MP Team

[00:37:52] filterscripts = ""  (string)
[00:37:52] 
[00:37:52] Server Plugins
[00:37:52] --------------
[00:37:52]  Loading plugin: AntiDDoS_Guard
[00:37:52]   Failed.
[00:37:52]  Loading plugin: crashdetect
[00:37:52]   CrashDetect v4.15.1 is OK.
[00:37:52]   Loaded.
[00:37:52]  Loading plugin: streamer
[00:37:52] 

*** Streamer Plugin v2.8.2 by Incognito loaded ***

[00:37:52]   Loaded.
[00:37:52]  Loading plugin: sscanf
[00:37:52] 

[00:37:52]  ===============================

[00:37:52]       sscanf plugin loaded.     

[00:37:52]          Version:  2.8.1        

[00:37:52]    (c) 2012 Alex "Y_Less" Cole  

[00:37:52]  ===============================

[00:37:52]   Loaded.
[00:37:52]  Loading plugin: mysql
[00:37:52]  >> plugin.mysql: R39-5 successfully loaded.
[00:37:52]   Loaded.
[00:37:52]  Loading plugin: CRP
[00:37:52] 

[00:37:52] ______________________________________

[00:37:52]  Convert Rus To Pwn v0.1.1 loaded
[00:37:52] ______________________________________

[00:37:52]  By: Fro (c) Copyright <TBG> 2009-2011
[00:37:52] ______________________________________

[00:37:52]   Loaded.
[00:37:52]  Loading plugin: regex
[00:37:52] 

[00:37:52] ______________________________________

[00:37:52]  Regular Expression Plugin v0.2.1 loaded
[00:37:52] ______________________________________

[00:37:52]  By: Fro (c) Copyright <TBG> 2009-2011
[00:37:52] ______________________________________

[00:37:52]   Loaded.
[00:37:52]  Loading plugin: dc_cmd
[00:37:52]   Daniel's CMD plugin v2.8
[00:37:52]     (c) 2014 Daniel_Cortez
[00:37:52]     www.pro-pawn.ru
[00:37:52]   Loaded.
[00:37:52]  Loaded 7 plugins.

[00:37:52] 
[00:37:52] Ban list
[00:37:52] --------
[00:37:52]  Loaded: samp.ban
[00:37:52] 
[00:37:53] 
[00:37:53] Filterscripts
[00:37:53] ---------------
[00:37:53]   Loaded 0 filterscripts.

[00:37:53]  
[00:37:53]  
[00:37:53]  
[00:37:53]  ======================================= 
[00:37:53]  |                                     | 
[00:37:53]  |        YSI version 3.09.0684        | 
[00:37:53]  |        By Alex "Y_Less" Cole        | 
[00:37:53]  |                                     | 
[00:37:53]  ======================================= 
[00:37:53]  
[00:37:53] [MySQL]: Подключение к базе данных прошло успешно
[00:37:53] Number of vehicle models: 10
[00:37:53] [Загружено орг/раб. автомобилей]: <135>. Потрачено: <6 ms>.
[00:37:53] [Загружено рангов для фракций]: <12>. Потрачено: <0 ms>.
[00:37:53] [Загружено бизнесов]: <2>. Потрачено: <0 ms>.
[00:37:53] [Загружено домов]: <0>. Потрачено: <0 ms>.
[00:37:53] [Загружены склады мафий]: Потрачено: <0 ms>.
[00:37:53] [Загружены склады ОПГ]: Потрачено: <0 ms>.
[00:37:53] [Загружено банкоматов]: <0>. Потрачено: <0 ms>.
[00:37:53] [Загружено остальное]: Потрачено: <1 ms>.
[00:37:53] [Загружено радаров]: <1>. Потрачено: <0 ms>.
[00:37:53] [System Hotels]: 50 hotels successfully loaded
[00:38:18] Incoming connection: 127.0.0.1:50736
[00:38:18] [join] Luka_Lokonte has joined the server (0:127.0.0.1)
[00:38:34] login leader = 1
[00:38:34] [DEBUG]: error: 1054, errorname: Unknown column 'online' in 'field list', callback: , querystr: UPDATE `admin` SET `online` = '1' WHERE name='Luka_Lokonte', connection id: 1
[00:38:46] 0
 

Share this post


Link to post
Share on other sites

@FENRIS Возможно, это происходит потому, что вы являетесь администратором. Попробуйте выдать себе лидерку, а потом снять себя с админки и перезайти на сервер. Будет ли сохранена лидерка? 

Share this post


Link to post
Share on other sites

@stibs А вот так можно?: Зарегистрировать новый аккаунт на сервере, и выдать лидерку через БД

Share this post


Link to post
Share on other sites

@stibs Реально работает! Спасибо! Но другой вопрос, как тогда убрать такое ограничение на администратора?

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

    • E)/(IK
      By E)/(IK
      В моде Only RolePlay можно создать всего 612 машин,для сервера мне надо  700. Так как я буду добавлять в игру их. Просто нужно мне узнать,как сделать так,чтобы больше машин можно было спавинть. После написания команды /veh 613 0 0 пишет введите /veh [ID Машины] [цвет1] [цвет2] а если вводить меньше то все работает.