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



Не найдено.

9 posts in this topic

Здравствуйте, сейчас чувствую себя не очень поэтому не судите если плохо буду описывать что либо. Мне надо чтобы пробег с автомобиля сохранялся и при передаче автомобиля он не сбрасывался. Прошу помочь и объясните)

Share this post


Link to post
Share on other sites

@Remmi_Feed сейчас он не сохраняется?

Share this post


Link to post
Share on other sites

@DEST нет, просто 300 метров +1 км. а при перезагрузке серва не сохраняется

Share this post


Link to post
Share on other sites

@Remmi_Feed ну значит как сделано в сохранении акков по примеру добавь сохранение своего пробега. 

Share this post


Link to post
Share on other sites

@DEST спасибо :)

@DEST а где находится сохранение?) Как искать?

Share this post


Link to post
Share on other sites

может у тебя и нет сохранение авто , придётся с 0 писать

Share this post


Link to post
Share on other sites

@Daniil Roslyakov увы в базе этого вообще нету. Попробую сделать по примеру сохранения покраски авто

@MuhammadPawn нету именно сохранения пробега

Share this post


Link to post
Share on other sites

В общем вот что я сделал, и судя по ошибкам не правильно. 

 

- В диалог FIXCAR добавил CAR_DATA[MAX_VEHICLES][C_DATA]

Спойлер

	    case dialog_FIXCAR:
	    {
	        if(!response) return true;
	        if(response)
	        {
	            new c = listitem;
             	if(PLAYER_DATA[playerid][data_CAR][c] == 0) return SendClientMessage(playerid,COLOR_WARNING,"Данный слот пуст!");

				if(PLAYER_DATA[playerid][data_VIP] == 0)
				{
					if(get_player_money(playerid) < 300) return SendClientMessage(playerid,COLOR_WARNING,"У Вас недостаточно денег на руках (300 рублей)");
	                give_player_money(playerid,-300,"#77");
                }
                
				new h = PLAYER_DATA[playerid][data_HOUSE],kv = PLAYER_DATA[playerid][data_PADIK];

				if(PLAYER_DATA[playerid][data_VEH] != INVALID_VEHICLE_ID) DestroyVehicle(PLAYER_DATA[playerid][data_VEH]), fixcared[c][playerid] = false, Delete3DTextLabel(numbertext[PLAYER_DATA[playerid][data_VEH]]);
			   	if(PLAYER_DATA[playerid][data_HOUSE] != INVALID_HOUSE_ID)
			   	{
			    	PLAYER_DATA[playerid][data_VEH] = CreateVehicle(PLAYER_DATA[playerid][data_CAR][c], HOUSE_DATA[h][data_CARX], HOUSE_DATA[h][data_CARY], HOUSE_DATA[h][data_CARZ],  HOUSE_DATA[h][data_CARANGLE], PLAYER_DATA[playerid][data_CAR_COLOR1][c], PLAYER_DATA[playerid][data_CAR_COLOR2][c], CAR_DATA[MAX_VEHICLES][C_DATA], 360000);
					new car = PLAYER_DATA[playerid][data_VEH];
					fixcared[c][playerid] = true;
					ClearCarData(car);
					CAR_DATA[car][data_FUEL] = 50;
			    }
			    else if(PLAYER_DATA[playerid][data_KV] != INVALID_KV_ID)
			   	{
			   	    PLAYER_DATA[playerid][data_VEH] = CreateVehicle(PLAYER_DATA[playerid][data_CAR][c], KV_DATA[kv][data_CAR_POSX],  KV_DATA[kv][data_CAR_POSY],  KV_DATA[kv][data_CAR_POSZ],   KV_DATA[kv][data_CAR_POSA], PLAYER_DATA[playerid][data_CAR_COLOR1][c], PLAYER_DATA[playerid][data_CAR_COLOR2][c], CAR_DATA[MAX_VEHICLES][C_DATA], 360000);
					new car = PLAYER_DATA[playerid][data_VEH];
			        ClearCarData(car);
			        fixcared[c][playerid] = true;
					CAR_DATA[car][data_FUEL] = 50;
				}
            }                                            

 

 

Спойлер

public LoadPlayerData(playerid)
{
	new rows, fields, temp[10],login_ip[32];
    cache_get_data(rows, fields);
    if(rows)
	{
		cache_get_field_content(0, "id", temp), PLAYER_DATA[playerid][data_ID] = strval (temp);
		cache_get_field_content(0, "sex", temp), PLAYER_DATA[playerid][data_SEX] = strval (temp);
		cache_get_field_content(0, "skin", temp), PLAYER_DATA[playerid][data_SKIN] = strval (temp);
		cache_get_field_content(0, "skinm", temp), PLAYER_DATA[playerid][data_SKINM] = strval (temp);
		cache_get_field_content(0, "money", temp), PLAYER_DATA[playerid][data_MONEY] = strval (temp);
		cache_get_field_content(0, "lvl", temp), PLAYER_DATA[playerid][data_LVL] = strval (temp);
		cache_get_field_content(0, "exp", temp), PLAYER_DATA[playerid][data_EXP] = strval (temp);
		cache_get_field_content(0, "member", temp), PLAYER_DATA[playerid][data_MEMBER] = strval (temp);
		cache_get_field_content(0, "leader", temp), PLAYER_DATA[playerid][data_LEADER] = strval (temp);
		cache_get_field_content(0, "podmember", temp), PLAYER_DATA[playerid][data_PODMEMBER] = strval (temp);
		cache_get_field_content(0, "rank", temp), PLAYER_DATA[playerid][data_RANK] = strval (temp);
		cache_get_field_content(0, "admlvl", temp), PLAYER_DATA[playerid][data_ADMLVL] = strval (temp);
		cache_get_field_content(0, "contry", temp), PLAYER_DATA[playerid][data_CONTRY] = strval (temp);
		cache_get_field_content(0, "register_ip", PLAYER_DATA[playerid][data_REGISTER_IP], dbHandle, 32);
		cache_get_field_content(0, "login_ip", login_ip, dbHandle, 32);
		cache_get_field_content(0, "email", PLAYER_DATA[playerid][data_EMAIL], dbHandle, 50);
		cache_get_field_content(0, "regdate_day", temp), PLAYER_DATA[playerid][data_REGDATE_DAY] = strval (temp);
		cache_get_field_content(0, "regdate_month", temp), PLAYER_DATA[playerid][data_REGDATE_MONTH] = strval (temp);
		cache_get_field_content(0, "regdate_year", temp), PLAYER_DATA[playerid][data_REGDATE_YEAR] = strval (temp);
		cache_get_field_content(0, "mute", temp), PLAYER_DATA[playerid][data_MUTE] = strval (temp);
		cache_get_field_content(0, "mutetime", temp), PLAYER_DATA[playerid][data_MUTETIME] = strval (temp);
		cache_get_field_content(0, "warn", temp), PLAYER_DATA[playerid][data_WARN] = strval (temp);
		cache_get_field_content(0, "warntime", temp), PLAYER_DATA[playerid][data_WARNTIME] = strval (temp);
		cache_get_field_content(0, "salary", temp), PLAYER_DATA[playerid][data_SALARY] = strval (temp);
		cache_get_field_content(0, "bank", temp), PLAYER_DATA[playerid][data_BANK] = strval (temp);
		cache_get_field_content(0, "licb", temp), PLAYER_DATA[playerid][data_LICB] = strval (temp);
		cache_get_field_content(0, "licg", temp), PLAYER_DATA[playerid][data_LICG] = strval (temp);
		cache_get_field_content(0, "business", temp), PLAYER_DATA[playerid][data_BUSINESS] = strval (temp);
		cache_get_field_content(0, "house", temp), PLAYER_DATA[playerid][data_HOUSE] = strval (temp);
		cache_get_field_content(0, "vip", temp), PLAYER_DATA[playerid][data_VIP] = strval (temp);
		cache_get_field_content(0, "time", temp), PLAYER_DATA[playerid][data_TIME] = strval (temp);
		cache_get_field_content(0, "car_1", temp), PLAYER_DATA[playerid][data_CAR][0] = strval (temp);
		cache_get_field_content(0, "carfuel_1", temp), PLAYER_DATA[playerid][data_CARFUEL][0] = strval (temp);
		cache_get_field_content(0, "car_color1_1", temp), PLAYER_DATA[playerid][data_CAR_COLOR1][0] = strval (temp);
		cache_get_field_content(0, "car_color2_1", temp), PLAYER_DATA[playerid][data_CAR_COLOR2][0] = strval (temp);
		cache_get_field_content(0, "car_2", temp), PLAYER_DATA[playerid][data_CAR][1] = strval (temp);
		cache_get_field_content(0, "carfuel_2", temp), PLAYER_DATA[playerid][data_CARFUEL][1] = strval (temp);
		cache_get_field_content(0, "car_color1_2", temp), PLAYER_DATA[playerid][data_CAR_COLOR1][1] = strval (temp);
		cache_get_field_content(0, "car_color2_2", temp), PLAYER_DATA[playerid][data_CAR_COLOR2][1] = strval (temp);
		cache_get_field_content(0, "car_3", temp), PLAYER_DATA[playerid][data_CAR][2] = strval (temp);
		cache_get_field_content(0, "carfuel_3", temp), PLAYER_DATA[playerid][data_CARFUEL][2] = strval (temp);
		cache_get_field_content(0, "car_color1_3", temp), PLAYER_DATA[playerid][data_CAR_COLOR1][2] = strval (temp);
		cache_get_field_content(0, "car_color2_3", temp), PLAYER_DATA[playerid][data_CAR_COLOR2][2] = strval (temp);
		cache_get_field_content(0, "patr", temp), PLAYER_DATA[playerid][data_PATR] = strval (temp);
		cache_get_field_content(0, "drugs", temp), PLAYER_DATA[playerid][data_DRUGS] = strval (temp);
		cache_get_field_content(0, "met", temp), PLAYER_DATA[playerid][data_MET] = strval (temp);
		cache_get_field_content(0, "wanted", temp), PLAYER_DATA[playerid][data_WANTED] = strval (temp);
		cache_get_field_content(0, "zakon", temp), PLAYER_DATA[playerid][data_ZAKON] = strval (temp);
		cache_get_field_content(0, "number", temp), PLAYER_DATA[playerid][data_NUMBER] = strval (temp);
		cache_get_field_content(0, "number_m", temp), PLAYER_DATA[playerid][data_NUMBER_M] = strval (temp);
		cache_get_field_content(0, "jail", temp), PLAYER_DATA[playerid][data_JAIL] = strval (temp);
		cache_get_field_content(0, "jailtime", temp), PLAYER_DATA[playerid][data_JAILTIME] = strval (temp);
		cache_get_field_content(0, "donate", temp), PLAYER_DATA[playerid][data_DONATE] = strval (temp);
		cache_get_field_content(0, "donate_p", temp), PLAYER_DATA[playerid][data_DONATE_P] = strval (temp);
		cache_get_field_content(0, "donate_all", temp), PLAYER_DATA[playerid][data_DONATE_ALL] = strval (temp);
		cache_get_field_content(0, "phone", temp), PLAYER_DATA[playerid][data_PHONE] = strval (temp);
		cache_get_field_content(0, "phonebook", temp), PLAYER_DATA[playerid][data_PHONEBOOK] = strval (temp);
		cache_get_field_content(0, "dir", temp), PLAYER_DATA[playerid][data_DIR] = strval (temp);
		cache_get_field_content(0, "satiety", temp), PLAYER_DATA[playerid][data_SATIETY] = strval (temp);
		cache_get_field_content(0, "promocode", temp), PLAYER_DATA[playerid][data_PROMOCODE] = strval (temp);
		cache_get_field_content(0, "hp", temp), PLAYER_DATA[playerid][data_HP] = strval (temp);
		cache_get_field_content(0, "arm", temp), PLAYER_DATA[playerid][data_ARM] = strval (temp);
		cache_get_field_content(0, "med", temp), PLAYER_DATA[playerid][data_MED] = strval (temp);
		cache_get_field_content(0, "spawn", temp), PLAYER_DATA[playerid][data_SPAWN] = strval (temp);
		cache_get_field_content(0, "hospital", temp), PLAYER_DATA[playerid][data_HOSPITAL] = strval (temp);
		cache_get_field_content(0, "pistol_skill", temp), PLAYER_DATA[playerid][data_PISTOL] = strval (temp);
		cache_get_field_content(0, "sdpistol_skill", temp), PLAYER_DATA[playerid][data_SDPISTOL] = strval (temp);
		cache_get_field_content(0, "deagle_skill", temp), PLAYER_DATA[playerid][data_DEAGLE] = strval (temp);
		cache_get_field_content(0, "shotgun_skill", temp), PLAYER_DATA[playerid][data_SHOTGUN] = strval (temp);
		cache_get_field_content(0, "mp5_skill", temp), PLAYER_DATA[playerid][data_MP5] = strval (temp);
		cache_get_field_content(0, "ak47_skill", temp), PLAYER_DATA[playerid][data_AK47] = strval (temp);
		cache_get_field_content(0, "rifle_skill", temp), PLAYER_DATA[playerid][data_SNIPERRIFLE] = strval (temp);
	    cache_get_field_content(0, "job", temp), PLAYER_DATA[playerid][data_JOB] = strval (temp);
	    cache_get_field_content(0, "polit", temp), PLAYER_DATA[playerid][data_POLIT] = strval (temp);
	    cache_get_field_content(0, "house", temp), PLAYER_DATA[playerid][data_HOUSE] = strval (temp);
	    cache_get_field_content(0, "business", temp), PLAYER_DATA[playerid][data_BUSINESS] = strval (temp);
	    new carnumberss[151];
	    cache_get_field_content(0, "numbercar", carnumberss), sscanf(carnumberss, "p<,>s[50]s[50]s[50]", PLAYER_DATA[playerid][data_CARNUMBER_1], PLAYER_DATA[playerid][data_CARNUMBER_2], PLAYER_DATA[playerid][data_CARNUMBER_3]);
		cache_get_field_content(0, "numberreg", carnumberss), sscanf(carnumberss, "p<,>ddd", PLAYER_DATA[playerid][data_CARNUMBER_REGION][0], PLAYER_DATA[playerid][data_CARNUMBER_REGION][1], PLAYER_DATA[playerid][data_CARNUMBER_REGION][2]);
		cache_get_field_content(0, "kv", temp), PLAYER_DATA[playerid][data_KV] = strval (temp);
	    cache_get_field_content(0, "jb", temp), PLAYER_DATA[playerid][data_JB] = strval (temp);
	    cache_get_field_content(0, "ab", temp), PLAYER_DATA[playerid][data_AB] = strval (temp);
	    cache_get_field_content(0, "padik", temp), PLAYER_DATA[playerid][data_PADIK] = strval (temp);
	    cache_get_field_content(0, "d_skill", temp), PLAYER_DATA[playerid][data_DSKILL] = strval (temp);
	    cache_get_field_content(0, "d_exp", temp), PLAYER_DATA[playerid][data_DEXP] = strval (temp);
	    cache_get_field_content(0, "gun0", temp), PLAYER_DATA[playerid][data_GUN][0] = strval (temp);
		cache_get_field_content(0, "gun1", temp), PLAYER_DATA[playerid][data_GUN][1] = strval (temp);
		cache_get_field_content(0, "gun2", temp), PLAYER_DATA[playerid][data_GUN][2] = strval (temp);
		cache_get_field_content(0, "gun3", temp), PLAYER_DATA[playerid][data_GUN][3] = strval (temp);
		cache_get_field_content(0, "gun4", temp), PLAYER_DATA[playerid][data_GUN][4] = strval (temp);
		cache_get_field_content(0, "gun5", temp), PLAYER_DATA[playerid][data_GUN][5] = strval (temp);
		cache_get_field_content(0, "gun6", temp), PLAYER_DATA[playerid][data_GUN][6] = strval (temp);
		cache_get_field_content(0, "gun7", temp), PLAYER_DATA[playerid][data_GUN][7] = strval (temp);
		cache_get_field_content(0, "gun8", temp), PLAYER_DATA[playerid][data_GUN][8] = strval (temp);
		cache_get_field_content(0, "gun9", temp), PLAYER_DATA[playerid][data_GUN][9] = strval (temp);
		cache_get_field_content(0, "gun10", temp), PLAYER_DATA[playerid][data_GUN][10] = strval (temp);
		cache_get_field_content(0, "gun11", temp), PLAYER_DATA[playerid][data_GUN][11] = strval (temp);
		cache_get_field_content(0, "gun12", temp), PLAYER_DATA[playerid][data_GUN][12] = strval (temp);
		cache_get_field_content(0, "ammo0", temp), PLAYER_DATA[playerid][data_AMMO][0] = strval (temp);
		cache_get_field_content(0, "ammo1", temp), PLAYER_DATA[playerid][data_AMMO][1] = strval (temp);
		cache_get_field_content(0, "ammo2", temp), PLAYER_DATA[playerid][data_AMMO][2] = strval (temp);
		cache_get_field_content(0, "ammo3", temp), PLAYER_DATA[playerid][data_AMMO][3] = strval (temp);
		cache_get_field_content(0, "ammo4", temp), PLAYER_DATA[playerid][data_AMMO][4] = strval (temp);
		cache_get_field_content(0, "ammo5", temp), PLAYER_DATA[playerid][data_AMMO][5] = strval (temp);
		cache_get_field_content(0, "ammo6", temp), PLAYER_DATA[playerid][data_AMMO][6] = strval (temp);
		cache_get_field_content(0, "ammo7", temp), PLAYER_DATA[playerid][data_AMMO][7] = strval (temp);
		cache_get_field_content(0, "ammo8", temp), PLAYER_DATA[playerid][data_AMMO][8] = strval (temp);
		cache_get_field_content(0, "ammo9", temp), PLAYER_DATA[playerid][data_AMMO][9] = strval (temp);
		cache_get_field_content(0, "ammo10", temp), PLAYER_DATA[playerid][data_AMMO][10] = strval (temp);
		cache_get_field_content(0, "ammo11", temp), PLAYER_DATA[playerid][data_AMMO][11] = strval (temp);
		cache_get_field_content(0, "ammo12", temp), PLAYER_DATA[playerid][data_AMMO][12] = strval (temp);
		cache_get_field_content(0, "golos", temp), PLAYER_DATA[playerid][data_GOLOS] = strval (temp);
		cache_get_field_content(0, "polit", temp), PLAYER_DATA[playerid][data_POLIT] = strval (temp);
		cache_get_field_content(0, "podarok1", temp), PLAYER_DATA[playerid][data_PODAROK][0] = strval (temp);
		cache_get_field_content(0, "podarok2", temp), PLAYER_DATA[playerid][data_PODAROK][1] = strval (temp);
		cache_get_field_content(0, "podarok3", temp), PLAYER_DATA[playerid][data_PODAROK][2] = strval (temp);
		cache_get_field_content(0, "podarok4", temp), PLAYER_DATA[playerid][data_PODAROK][3] = strval (temp);
		cache_get_field_content(0, "podarok5", temp), PLAYER_DATA[playerid][data_PODAROK][4] = strval (temp);
		cache_get_field_content(0, "podarok6", temp), PLAYER_DATA[playerid][data_PODAROK][5] = strval (temp);
		cache_get_field_content(0, "podarok7", temp), PLAYER_DATA[playerid][data_PODAROK][6] = strval (temp);
		cache_get_field_content(0, "podarok8", temp), PLAYER_DATA[playerid][data_PODAROK][7] = strval (temp);
		cache_get_field_content(0, "ODOMETR", temp),CAR_DATA[MAX_VEHICLES][C_DATA][0] = strval (temp);

 

 

- Далее stock SavePlayerData(playerid)

Спойлер

stock SavePlayerData(playerid)
{
	if(PLAYER_DATA[playerid][data_LOGGED] == true && IsPlayerConnected(playerid))
	{
		
		if(PLAYER_DATA[playerid][data_CS_TEAM] != 0) ResetWeaponAll(playerid);
	    new query[3000], string[145];
		query = "UPDATE `accounts` SET ";
		acc_int_strcat(query, sizeof(query), "logdate_day", PLAYER_DATA[playerid][data_LOGDATE_DAY]);
		acc_int_strcat(query, sizeof(query), "logdate_month", PLAYER_DATA[playerid][data_LOGDATE_MONTH]);
		acc_int_strcat(query, sizeof(query), "logdate_year", PLAYER_DATA[playerid][data_LOGDATE_YEAR]);
		acc_int_strcat(query, sizeof(query), "skin", PLAYER_DATA[playerid][data_SKIN]);
		acc_int_strcat(query, sizeof(query), "money", PLAYER_DATA[playerid][data_MONEY]);
		acc_int_strcat(query, sizeof(query), "lvl", PLAYER_DATA[playerid][data_LVL]);
		acc_int_strcat(query, sizeof(query), "exp", PLAYER_DATA[playerid][data_EXP]);
		acc_int_strcat(query, sizeof(query), "skinm", PLAYER_DATA[playerid][data_SKINM]);
		acc_int_strcat(query, sizeof(query), "member", PLAYER_DATA[playerid][data_MEMBER]);
		acc_int_strcat(query, sizeof(query), "leader", PLAYER_DATA[playerid][data_LEADER]);
		acc_int_strcat(query, sizeof(query), "podmember", PLAYER_DATA[playerid][data_PODMEMBER]);
		acc_int_strcat(query, sizeof(query), "rank", PLAYER_DATA[playerid][data_RANK]);
		acc_int_strcat(query, sizeof(query), "admlvl", PLAYER_DATA[playerid][data_ADMLVL]);
		acc_str_strcat(query, sizeof(query), "login_ip", PLAYER_DATA[playerid][data_LOGIN_IP]);
		acc_int_strcat(query, sizeof(query), "mute", PLAYER_DATA[playerid][data_MUTE]);
		acc_int_strcat(query, sizeof(query), "mutetime", PLAYER_DATA[playerid][data_MUTETIME]);
		acc_int_strcat(query, sizeof(query), "warn", PLAYER_DATA[playerid][data_WARN]);
		acc_int_strcat(query, sizeof(query), "warntime", PLAYER_DATA[playerid][data_WARNTIME]);
		acc_int_strcat(query, sizeof(query), "salary", PLAYER_DATA[playerid][data_SALARY]);
		acc_int_strcat(query, sizeof(query), "bank", PLAYER_DATA[playerid][data_BANK]);
		acc_int_strcat(query, sizeof(query), "licb", PLAYER_DATA[playerid][data_LICB]);
		acc_int_strcat(query, sizeof(query), "licg", PLAYER_DATA[playerid][data_LICG]);
		acc_int_strcat(query, sizeof(query), "contry", PLAYER_DATA[playerid][data_CONTRY]);

		acc_int_strcat(query, sizeof(query), "business", PLAYER_DATA[playerid][data_BUSINESS]);
		acc_int_strcat(query, sizeof(query), "house", PLAYER_DATA[playerid][data_HOUSE]);
		acc_int_strcat(query, sizeof(query), "time", PLAYER_DATA[playerid][data_TIME]);
		acc_int_strcat(query, sizeof(query), "car_1", PLAYER_DATA[playerid][data_CAR][0]);
		acc_int_strcat(query, sizeof(query), "carfuel_1", PLAYER_DATA[playerid][data_CARFUEL][0]);
		acc_int_strcat(query, sizeof(query), "car_color1_1", PLAYER_DATA[playerid][data_CAR_COLOR1][0]);
		acc_int_strcat(query, sizeof(query), "car_color2_1", PLAYER_DATA[playerid][data_CAR_COLOR2][0]);
		acc_int_strcat(query, sizeof(query), "car_2", PLAYER_DATA[playerid][data_CAR][1]);
		acc_int_strcat(query, sizeof(query), "carfuel_2", PLAYER_DATA[playerid][data_CARFUEL][1]);
		acc_int_strcat(query, sizeof(query), "car_color1_2", PLAYER_DATA[playerid][data_CAR_COLOR1][1]);
		acc_int_strcat(query, sizeof(query), "car_color2_2", PLAYER_DATA[playerid][data_CAR_COLOR2][1]);
		acc_int_strcat(query, sizeof(query), "car_3", PLAYER_DATA[playerid][data_CAR][2]);
		acc_int_strcat(query, sizeof(query), "carfuel_3", PLAYER_DATA[playerid][data_CARFUEL][2]);
		acc_int_strcat(query, sizeof(query), "car_color1_3", PLAYER_DATA[playerid][data_CAR_COLOR1][2]);
		acc_int_strcat(query, sizeof(query), "car_color2_3", PLAYER_DATA[playerid][data_CAR_COLOR2][2]);
		acc_int_strcat(query, sizeof(query), "vip", PLAYER_DATA[playerid][data_VIP]);
		acc_int_strcat(query, sizeof(query), "patr", PLAYER_DATA[playerid][data_PATR]);
		acc_int_strcat(query, sizeof(query), "drugs", PLAYER_DATA[playerid][data_DRUGS]);
		acc_int_strcat(query, sizeof(query), "met", PLAYER_DATA[playerid][data_MET]);
		acc_int_strcat(query, sizeof(query), "wanted", PLAYER_DATA[playerid][data_WANTED]);
		acc_int_strcat(query, sizeof(query), "zakon", PLAYER_DATA[playerid][data_ZAKON]);
		acc_int_strcat(query, sizeof(query), "number", PLAYER_DATA[playerid][data_NUMBER]);
		acc_int_strcat(query, sizeof(query), "number_m", PLAYER_DATA[playerid][data_NUMBER_M]);
		acc_int_strcat(query, sizeof(query), "jail", PLAYER_DATA[playerid][data_JAIL]);
		acc_int_strcat(query, sizeof(query), "jailtime", PLAYER_DATA[playerid][data_JAILTIME]);
		acc_int_strcat(query, sizeof(query), "donate", PLAYER_DATA[playerid][data_DONATE]);
		acc_int_strcat(query, sizeof(query), "phone", PLAYER_DATA[playerid][data_PHONE]);
		acc_int_strcat(query, sizeof(query), "phonebook", PLAYER_DATA[playerid][data_PHONEBOOK]);
		acc_int_strcat(query, sizeof(query), "dir", PLAYER_DATA[playerid][data_DIR]);
		acc_int_strcat(query, sizeof(query), "satiety", PLAYER_DATA[playerid][data_SATIETY]);
		acc_float_strcat(query, sizeof(query), "hp", PLAYER_DATA[playerid][data_HP]);
		acc_float_strcat(query, sizeof(query), "arm", PLAYER_DATA[playerid][data_ARM]);
		acc_int_strcat(query, sizeof(query), "med", PLAYER_DATA[playerid][data_MED]);
		acc_int_strcat(query, sizeof(query), "spawn", PLAYER_DATA[playerid][data_SPAWN]);
		acc_int_strcat(query, sizeof(query), "hospital", PLAYER_DATA[playerid][data_HOSPITAL]);
		acc_int_strcat(query, sizeof(query), "pistol_skill", PLAYER_DATA[playerid][data_PISTOL]);
		acc_int_strcat(query, sizeof(query), "sdpistol_skill", PLAYER_DATA[playerid][data_SDPISTOL]);
		acc_int_strcat(query, sizeof(query), "deagle_skill", PLAYER_DATA[playerid][data_DEAGLE]);
		acc_int_strcat(query, sizeof(query), "shotgun_skill", PLAYER_DATA[playerid][data_SHOTGUN]);
		acc_int_strcat(query, sizeof(query), "mp5_skill", PLAYER_DATA[playerid][data_MP5]);
		acc_int_strcat(query, sizeof(query), "ak47_skill", PLAYER_DATA[playerid][data_AK47]);
		acc_int_strcat(query, sizeof(query), "rifle_skill", PLAYER_DATA[playerid][data_SNIPERRIFLE]);
		acc_int_strcat(query, sizeof(query), "job", PLAYER_DATA[playerid][data_JOB]);
		acc_int_strcat(query, sizeof(query), "polit", PLAYER_DATA[playerid][data_POLIT]);
		acc_int_strcat(query, sizeof(query), "house", PLAYER_DATA[playerid][data_HOUSE]);
		acc_int_strcat(query, sizeof(query), "business", PLAYER_DATA[playerid][data_BUSINESS]);
		acc_int_strcat(query, sizeof(query), "kv", PLAYER_DATA[playerid][data_KV]);
		acc_int_strcat(query, sizeof(query), "jb", PLAYER_DATA[playerid][data_JB]);
		acc_int_strcat(query, sizeof(query), "ab", PLAYER_DATA[playerid][data_AB]);
		acc_int_strcat(query, sizeof(query), "padik", PLAYER_DATA[playerid][data_PADIK]);
		acc_int_strcat(query, sizeof(query), "d_skill", PLAYER_DATA[playerid][data_DSKILL]);
		acc_int_strcat(query, sizeof(query), "d_exp", PLAYER_DATA[playerid][data_DEXP]);
		acc_int_strcat(query, sizeof(query), "golos", PLAYER_DATA[playerid][data_GOLOS]);
		acc_int_strcat(query, sizeof(query), "gun0", PLAYER_DATA[playerid][data_GUN][0]);
		acc_int_strcat(query, sizeof(query), "gun1", PLAYER_DATA[playerid][data_GUN][1]);
		acc_int_strcat(query, sizeof(query), "gun2", PLAYER_DATA[playerid][data_GUN][2]);
		acc_int_strcat(query, sizeof(query), "gun3", PLAYER_DATA[playerid][data_GUN][3]);
		acc_int_strcat(query, sizeof(query), "gun4", PLAYER_DATA[playerid][data_GUN][4]);
		acc_int_strcat(query, sizeof(query), "gun5", PLAYER_DATA[playerid][data_GUN][5]);
		acc_int_strcat(query, sizeof(query), "gun6", PLAYER_DATA[playerid][data_GUN][6]);
		acc_int_strcat(query, sizeof(query), "gun7", PLAYER_DATA[playerid][data_GUN][7]);
		acc_int_strcat(query, sizeof(query), "gun8", PLAYER_DATA[playerid][data_GUN][8]);
		acc_int_strcat(query, sizeof(query), "gun9", PLAYER_DATA[playerid][data_GUN][9]);
		acc_int_strcat(query, sizeof(query), "gun10", PLAYER_DATA[playerid][data_GUN][10]);
		acc_int_strcat(query, sizeof(query), "gun11", PLAYER_DATA[playerid][data_GUN][11]);
		acc_int_strcat(query, sizeof(query), "gun12", PLAYER_DATA[playerid][data_GUN][12]);
		acc_int_strcat(query, sizeof(query), "ammo0", PLAYER_DATA[playerid][data_AMMO][0]);
		acc_int_strcat(query, sizeof(query), "ammo1", PLAYER_DATA[playerid][data_AMMO][1]);
		acc_int_strcat(query, sizeof(query), "ammo2", PLAYER_DATA[playerid][data_AMMO][2]);
		acc_int_strcat(query, sizeof(query), "ammo3", PLAYER_DATA[playerid][data_AMMO][3]);
		acc_int_strcat(query, sizeof(query), "ammo4", PLAYER_DATA[playerid][data_AMMO][4]);
		acc_int_strcat(query, sizeof(query), "ammo5", PLAYER_DATA[playerid][data_AMMO][5]);
		acc_int_strcat(query, sizeof(query), "ammo6", PLAYER_DATA[playerid][data_AMMO][6]);
		acc_int_strcat(query, sizeof(query), "ammo7", PLAYER_DATA[playerid][data_AMMO][7]);
		acc_int_strcat(query, sizeof(query), "ammo8", PLAYER_DATA[playerid][data_AMMO][8]);
		acc_int_strcat(query, sizeof(query), "ammo9", PLAYER_DATA[playerid][data_AMMO][9]);
		acc_int_strcat(query, sizeof(query), "ammo10", PLAYER_DATA[playerid][data_AMMO][10]);
		acc_int_strcat(query, sizeof(query), "ammo11", PLAYER_DATA[playerid][data_AMMO][11]);
		acc_int_strcat(query, sizeof(query), "ammo12", PLAYER_DATA[playerid][data_AMMO][12]);
		acc_int_strcat(query, sizeof(query), "polit", PLAYER_DATA[playerid][data_POLIT]);
		acc_int_strcat(query, sizeof(query), "promocode", PLAYER_DATA[playerid][data_PROMOCODE]);
		acc_int_strcat(query, sizeof(query), "podarok1", PLAYER_DATA[playerid][data_PODAROK][0]);
		acc_int_strcat(query, sizeof(query), "podarok2", PLAYER_DATA[playerid][data_PODAROK][1]);
		acc_int_strcat(query, sizeof(query), "podarok3", PLAYER_DATA[playerid][data_PODAROK][2]);
		acc_int_strcat(query, sizeof(query), "podarok4", PLAYER_DATA[playerid][data_PODAROK][3]);
		acc_int_strcat(query, sizeof(query), "podarok5", PLAYER_DATA[playerid][data_PODAROK][4]);
		acc_int_strcat(query, sizeof(query), "podarok6", PLAYER_DATA[playerid][data_PODAROK][5]);
		acc_int_strcat(query, sizeof(query), "podarok7", PLAYER_DATA[playerid][data_PODAROK][6]);
		acc_int_strcat(query, sizeof(query), "podarok8", PLAYER_DATA[playerid][data_PODAROK][7]);
		acc_int_strcat(query, sizeof(query), "ODOMETR", CAR_DATA[MAX_VEHICLES][C_DATA][0]); // само сохранение одометра

 

 

- Сами ошибки: 

C:\Users\Александр\Desktop\VirtualTech RP\gamemodes\new.pwn(6833) : error 032: array index out of bounds (variable "CAR_DATA")
C:\Users\Александр\Desktop\VirtualTech RP\gamemodes\new.pwn(6841) : error 032: array index out of bounds (variable "CAR_DATA")
C:\Users\Александр\Desktop\VirtualTech RP\gamemodes\new.pwn(12770) : error 032: array index out of bounds (variable "CAR_DATA")
C:\Users\Александр\Desktop\VirtualTech RP\gamemodes\new.pwn(17537) : error 032: array index out of bounds (variable "CAR_DATA")

В общем надеюсь что люди помогут и по возможности объяснят. Прошу принять во внимание то что иметь можно 3 авто а значит что нужно будет сделать сохранение для 3 авто. Как я понял изначально было реализовано по типу car_color1_1, car_color1_2 и далее car_color1_3.

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

    • sawe123
      By sawe123
      Есть ли какая то система видел в моде что можно настраивать вес авто ищу такую систему.