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



Не найдено.

1 post in this topic

Помогите пожалуйста поправить 3DText когда квартира еще не купена все нормально, когда игрок покупает 3d текст как то так..

https://yapx.ru/u/CAwCj

Спойлер

stock UpdateKVData(kv, k)
{
	DestroyDynamic3DTextLabel(KV_DATA[kv][data_INFO][k]);
	DestroyDynamic3DTextLabel(KV_DATA[kv][data_GARDEROB][k]);
    new owner[MAX_PLAYER_NAME], class_kv[8],str[256];
	switch(k)
	{
		case 0: strmid(owner, KV_DATA[kv][data_OWNER_1], 0, strlen(KV_DATA[kv][data_OWNER_1]), MAX_PLAYER_NAME);
		case 1: strmid(owner, KV_DATA[kv][data_OWNER_2], 0, strlen(KV_DATA[kv][data_OWNER_2]), MAX_PLAYER_NAME);
		case 2: strmid(owner, KV_DATA[kv][data_OWNER_3], 0, strlen(KV_DATA[kv][data_OWNER_3]), MAX_PLAYER_NAME);
		case 3: strmid(owner, KV_DATA[kv][data_OWNER_4], 0, strlen(KV_DATA[kv][data_OWNER_4]), MAX_PLAYER_NAME);
		case 4: strmid(owner, KV_DATA[kv][data_OWNER_5], 0, strlen(KV_DATA[kv][data_OWNER_5]), MAX_PLAYER_NAME);
		case 5: strmid(owner, KV_DATA[kv][data_OWNER_6], 0, strlen(KV_DATA[kv][data_OWNER_6]), MAX_PLAYER_NAME);
		case 6: strmid(owner, KV_DATA[kv][data_OWNER_7], 0, strlen(KV_DATA[kv][data_OWNER_7]), MAX_PLAYER_NAME);
		case 7: strmid(owner, KV_DATA[kv][data_OWNER_8], 0, strlen(KV_DATA[kv][data_OWNER_8]), MAX_PLAYER_NAME);
		case 8: strmid(owner, KV_DATA[kv][data_OWNER_9], 0, strlen(KV_DATA[kv][data_OWNER_9]), MAX_PLAYER_NAME);
		case 9: strmid(owner, KV_DATA[kv][data_OWNER_10], 0, strlen(KV_DATA[kv][data_OWNER_10]), MAX_PLAYER_NAME);
		case 10: strmid(owner, KV_DATA[kv][data_OWNER_11], 0, strlen(KV_DATA[kv][data_OWNER_11]), MAX_PLAYER_NAME);
		case 11: strmid(owner, KV_DATA[kv][data_OWNER_12], 0, strlen(KV_DATA[kv][data_OWNER_12]), MAX_PLAYER_NAME);
		case 12: strmid(owner, KV_DATA[kv][data_OWNER_13], 0, strlen(KV_DATA[kv][data_OWNER_13]), MAX_PLAYER_NAME);
		case 13: strmid(owner, KV_DATA[kv][data_OWNER_14], 0, strlen(KV_DATA[kv][data_OWNER_14]), MAX_PLAYER_NAME);
	}
	switch(KV_DATA[kv][data_CLASS][k])
	{
		case 0: class_kv = "Эконом";
		case 1: class_kv = "Средний";
		case 2: class_kv = "Элитный";
	}

	if(KV_DATA[kv][data_OWNED][k] == 0)
	{
		format(str,sizeof(str), "{66FF66}Квартира №%d\n{6699CC}Класс: {FFFFFF}%s\n{6699CC}Стоимость: {FFFFFF}%d рублей\n{FFCC00}Для покупки используйте: /buy",k+1, class_kv, KV_DATA[kv][data_PRICE][k]);
		KV_DATA[kv][data_INFO][k] = CreateDynamic3DTextLabel(str, -1, KV_DATA[kv][data_ENTER_POSX][k], KV_DATA[kv][data_ENTER_POSY][k], KV_DATA[kv][data_ENTER_POSZ][k], 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]);
	}
	else
	{
		format(str,sizeof(str), "{66FF66}Квартира №%d\n{6699CC}Класс: {FFFFFF}%s\n{6699CC}Владелец: {FFFFFF}%s",k+1, class_kv, owner);
		KV_DATA[kv][data_INFO][k] = CreateDynamic3DTextLabel(str, -1, KV_DATA[kv][data_ENTER_POSX][k], KV_DATA[kv][data_ENTER_POSY][k], KV_DATA[kv][data_ENTER_POSZ][k], 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]);
	}

	new kk;
	for(new kq = 0; kq < 6; kq++)
	{
		if(KV_DATA[kv][data_OWNED][kq] == 0)
		{}
		else kk++;
	}
	if(kk == 6)
	{
	    DestroyDynamicMapIcon(KV_DATA[kv][data_MAPICON]);
		KV_DATA[kv][data_MAPICON] = CreateDynamicMapIcon(KV_DATA[kv][data_ENTER_X], KV_DATA[kv][data_ENTER_Y], KV_DATA[kv][data_ENTER_Z], 32, -1, 0, -1, -1, 100.0);
	}
	else
	{
	    DestroyDynamicMapIcon(KV_DATA[kv][data_MAPICON]);
		KV_DATA[kv][data_MAPICON] = CreateDynamicMapIcon(KV_DATA[kv][data_ENTER_X], KV_DATA[kv][data_ENTER_Y], KV_DATA[kv][data_ENTER_Z], 31, -1, 0, -1, -1, 100.0);
	}
	return true;
}

 

Спойлер

public LoadKV()
{
    new rows, fields, temp[256],time = GetTickCount(),str[256],str1[64];
    cache_get_data(rows, fields);
    if(rows)
    {
    	for(new kv = 0; kv < rows; kv++)
    	{
	        cache_get_field_content(kv, "id", temp), KV_DATA[kv][data_ID] = strval (temp);

         	cache_get_field_content(kv, "owner1", KV_DATA[kv][data_OWNER_1], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner2", KV_DATA[kv][data_OWNER_2], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner3", KV_DATA[kv][data_OWNER_3], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner4", KV_DATA[kv][data_OWNER_4], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner5", KV_DATA[kv][data_OWNER_5], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner6", KV_DATA[kv][data_OWNER_6], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner7", KV_DATA[kv][data_OWNER_7], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner8", KV_DATA[kv][data_OWNER_8], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner9", KV_DATA[kv][data_OWNER_9], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner10", KV_DATA[kv][data_OWNER_10], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner11", KV_DATA[kv][data_OWNER_11], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner12", KV_DATA[kv][data_OWNER_12], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner13", KV_DATA[kv][data_OWNER_13], dbHandle, MAX_PLAYER_NAME);
	        cache_get_field_content(kv, "owner14", KV_DATA[kv][data_OWNER_14], dbHandle, MAX_PLAYER_NAME);

            cache_get_field_content(kv, "owned1", temp), KV_DATA[kv][data_OWNED][0] = strval (temp);
	        cache_get_field_content(kv, "owned2", temp), KV_DATA[kv][data_OWNED][1] = strval (temp);
	        cache_get_field_content(kv, "owned3", temp), KV_DATA[kv][data_OWNED][2] = strval (temp);
	        cache_get_field_content(kv, "owned4", temp), KV_DATA[kv][data_OWNED][3] = strval (temp);
	        cache_get_field_content(kv, "owned5", temp), KV_DATA[kv][data_OWNED][4] = strval (temp);
	        cache_get_field_content(kv, "owned6", temp), KV_DATA[kv][data_OWNED][5] = strval (temp);
	        cache_get_field_content(kv, "owned7", temp), KV_DATA[kv][data_OWNED][6] = strval (temp);
	        cache_get_field_content(kv, "owned8", temp), KV_DATA[kv][data_OWNED][7] = strval (temp);
	        cache_get_field_content(kv, "owned9", temp), KV_DATA[kv][data_OWNED][8] = strval (temp);
	        cache_get_field_content(kv, "owned10", temp), KV_DATA[kv][data_OWNED][9] = strval (temp);
	        cache_get_field_content(kv, "owned11", temp), KV_DATA[kv][data_OWNED][10] = strval (temp);
	        cache_get_field_content(kv, "owned12", temp), KV_DATA[kv][data_OWNED][11] = strval (temp);
	        cache_get_field_content(kv, "owned13", temp), KV_DATA[kv][data_OWNED][12] = strval (temp);
	        cache_get_field_content(kv, "owned14", temp), KV_DATA[kv][data_OWNED][13] = strval (temp);

	        cache_get_field_content(kv, "price1", temp), KV_DATA[kv][data_PRICE][0] = strval (temp);
	        cache_get_field_content(kv, "price2", temp), KV_DATA[kv][data_PRICE][1] = strval (temp);
	        cache_get_field_content(kv, "price3", temp), KV_DATA[kv][data_PRICE][2] = strval (temp);
	        cache_get_field_content(kv, "price4", temp), KV_DATA[kv][data_PRICE][3] = strval (temp);
	        cache_get_field_content(kv, "price5", temp), KV_DATA[kv][data_PRICE][4] = strval (temp);
	        cache_get_field_content(kv, "price6", temp), KV_DATA[kv][data_PRICE][5] = strval (temp);
         	cache_get_field_content(kv, "price7", temp), KV_DATA[kv][data_PRICE][6] = strval (temp);
	        cache_get_field_content(kv, "price8", temp), KV_DATA[kv][data_PRICE][7] = strval (temp);
	        cache_get_field_content(kv, "price9", temp), KV_DATA[kv][data_PRICE][8] = strval (temp);
	        cache_get_field_content(kv, "price10", temp), KV_DATA[kv][data_PRICE][9] = strval (temp);
         	cache_get_field_content(kv, "price11", temp), KV_DATA[kv][data_PRICE][10] = strval (temp);
	        cache_get_field_content(kv, "price12", temp), KV_DATA[kv][data_PRICE][11] = strval (temp);
	        cache_get_field_content(kv, "price13", temp), KV_DATA[kv][data_PRICE][12] = strval (temp);
	        cache_get_field_content(kv, "price14", temp), KV_DATA[kv][data_PRICE][13] = strval (temp);

	        cache_get_field_content(kv, "lock1", temp), KV_DATA[kv][data_LOCK][0] = strval (temp);
	        cache_get_field_content(kv, "lock2", temp), KV_DATA[kv][data_LOCK][1] = strval (temp);
	        cache_get_field_content(kv, "lock3", temp), KV_DATA[kv][data_LOCK][2] = strval (temp);
	        cache_get_field_content(kv, "lock4", temp), KV_DATA[kv][data_LOCK][3] = strval (temp);
	        cache_get_field_content(kv, "lock5", temp), KV_DATA[kv][data_LOCK][4] = strval (temp);
	        cache_get_field_content(kv, "lock6", temp), KV_DATA[kv][data_LOCK][5] = strval (temp);
	       	cache_get_field_content(kv, "lock7", temp), KV_DATA[kv][data_LOCK][6] = strval (temp);
	        cache_get_field_content(kv, "lock8", temp), KV_DATA[kv][data_LOCK][7] = strval (temp);
	        cache_get_field_content(kv, "lock9", temp), KV_DATA[kv][data_LOCK][8] = strval (temp);
	        cache_get_field_content(kv, "lock10", temp), KV_DATA[kv][data_LOCK][9] = strval (temp);
	        cache_get_field_content(kv, "lock11", temp), KV_DATA[kv][data_LOCK][10] = strval (temp);
	        cache_get_field_content(kv, "lock12", temp), KV_DATA[kv][data_LOCK][11] = strval (temp);
	        cache_get_field_content(kv, "lock13", temp), KV_DATA[kv][data_LOCK][12] = strval (temp);
	        cache_get_field_content(kv, "lock14", temp), KV_DATA[kv][data_LOCK][13] = strval (temp);

	        cache_get_field_content(kv, "day1", temp), KV_DATA[kv][data_DAY][0] = strval (temp);
	        cache_get_field_content(kv, "day2", temp), KV_DATA[kv][data_DAY][1] = strval (temp);
	        cache_get_field_content(kv, "day3", temp), KV_DATA[kv][data_DAY][2] = strval (temp);
	        cache_get_field_content(kv, "day4", temp), KV_DATA[kv][data_DAY][3] = strval (temp);
	        cache_get_field_content(kv, "day5", temp), KV_DATA[kv][data_DAY][4] = strval (temp);
	        cache_get_field_content(kv, "day6", temp), KV_DATA[kv][data_DAY][5] = strval (temp);
	        cache_get_field_content(kv, "day7", temp), KV_DATA[kv][data_DAY][6] = strval (temp);
	        cache_get_field_content(kv, "day8", temp), KV_DATA[kv][data_DAY][7] = strval (temp);
	        cache_get_field_content(kv, "day9", temp), KV_DATA[kv][data_DAY][8] = strval (temp);
	        cache_get_field_content(kv, "day10", temp), KV_DATA[kv][data_DAY][9] = strval (temp);
	        cache_get_field_content(kv, "day11", temp), KV_DATA[kv][data_DAY][10] = strval (temp);
	        cache_get_field_content(kv, "day12", temp), KV_DATA[kv][data_DAY][11] = strval (temp);
	        cache_get_field_content(kv, "day13", temp), KV_DATA[kv][data_DAY][12] = strval (temp);
	        cache_get_field_content(kv, "day14", temp), KV_DATA[kv][data_DAY][13] = strval (temp);

	        cache_get_field_content(kv, "class1", temp), KV_DATA[kv][data_CLASS][0] = strval (temp);
	        cache_get_field_content(kv, "class2", temp), KV_DATA[kv][data_CLASS][1] = strval (temp);
	        cache_get_field_content(kv, "class3", temp), KV_DATA[kv][data_CLASS][2] = strval (temp);
	        cache_get_field_content(kv, "class4", temp), KV_DATA[kv][data_CLASS][3] = strval (temp);
	        cache_get_field_content(kv, "class5", temp), KV_DATA[kv][data_CLASS][4] = strval (temp);
	        cache_get_field_content(kv, "class6", temp), KV_DATA[kv][data_CLASS][5] = strval (temp);
	        cache_get_field_content(kv, "class7", temp), KV_DATA[kv][data_CLASS][6] = strval (temp);
	        cache_get_field_content(kv, "class8", temp), KV_DATA[kv][data_CLASS][7] = strval (temp);
	        cache_get_field_content(kv, "class9", temp), KV_DATA[kv][data_CLASS][8] = strval (temp);
	        cache_get_field_content(kv, "class10", temp), KV_DATA[kv][data_CLASS][9] = strval (temp);
	        cache_get_field_content(kv, "class11", temp), KV_DATA[kv][data_CLASS][10] = strval (temp);
	        cache_get_field_content(kv, "class12", temp), KV_DATA[kv][data_CLASS][11] = strval (temp);
	        cache_get_field_content(kv, "class13", temp), KV_DATA[kv][data_CLASS][12] = strval (temp);
	        cache_get_field_content(kv, "class14", temp), KV_DATA[kv][data_CLASS][13] = strval (temp);

	        cache_get_field_content(kv, "enter_x", temp), KV_DATA[kv][data_ENTER_X] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y", temp), KV_DATA[kv][data_ENTER_Y] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z", temp), KV_DATA[kv][data_ENTER_Z] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x", temp), KV_DATA[kv][data_EXIT_X] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y", temp), KV_DATA[kv][data_EXIT_Y] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z", temp), KV_DATA[kv][data_EXIT_Z] = floatstr (temp);

	        cache_get_field_content(kv, "enter_x1", temp), KV_DATA[kv][data_ENTER_POSX][0] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y1", temp), KV_DATA[kv][data_ENTER_POSY][0] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z1", temp), KV_DATA[kv][data_ENTER_POSZ][0] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x2", temp), KV_DATA[kv][data_ENTER_POSX][1] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y2", temp), KV_DATA[kv][data_ENTER_POSY][1] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z2", temp), KV_DATA[kv][data_ENTER_POSZ][1] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x3", temp), KV_DATA[kv][data_ENTER_POSX][2] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y3", temp), KV_DATA[kv][data_ENTER_POSY][2] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z3", temp), KV_DATA[kv][data_ENTER_POSZ][2] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x4", temp), KV_DATA[kv][data_ENTER_POSX][3] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y4", temp), KV_DATA[kv][data_ENTER_POSY][3] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z4", temp), KV_DATA[kv][data_ENTER_POSZ][3] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x5", temp), KV_DATA[kv][data_ENTER_POSX][4] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y5", temp), KV_DATA[kv][data_ENTER_POSY][4] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z5", temp), KV_DATA[kv][data_ENTER_POSZ][4] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x6", temp), KV_DATA[kv][data_ENTER_POSX][5] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y6", temp), KV_DATA[kv][data_ENTER_POSY][5] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z6", temp), KV_DATA[kv][data_ENTER_POSZ][5] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x7", temp), KV_DATA[kv][data_ENTER_POSX][6] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y7", temp), KV_DATA[kv][data_ENTER_POSY][6] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z7", temp), KV_DATA[kv][data_ENTER_POSZ][6] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x8", temp), KV_DATA[kv][data_ENTER_POSX][7] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y8", temp), KV_DATA[kv][data_ENTER_POSY][7] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z8", temp), KV_DATA[kv][data_ENTER_POSZ][7] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x9", temp), KV_DATA[kv][data_ENTER_POSX][8] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y9", temp), KV_DATA[kv][data_ENTER_POSY][8] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z9", temp), KV_DATA[kv][data_ENTER_POSZ][8] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x10", temp), KV_DATA[kv][data_ENTER_POSX][9] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y10", temp), KV_DATA[kv][data_ENTER_POSY][9] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z10", temp), KV_DATA[kv][data_ENTER_POSZ][9] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x11", temp), KV_DATA[kv][data_ENTER_POSX][10] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y11", temp), KV_DATA[kv][data_ENTER_POSY][10] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z11", temp), KV_DATA[kv][data_ENTER_POSZ][10] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x12", temp), KV_DATA[kv][data_ENTER_POSX][11] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y12", temp), KV_DATA[kv][data_ENTER_POSY][11] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z12", temp), KV_DATA[kv][data_ENTER_POSZ][11] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x13", temp), KV_DATA[kv][data_ENTER_POSX][12] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y13", temp), KV_DATA[kv][data_ENTER_POSY][12] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z13", temp), KV_DATA[kv][data_ENTER_POSZ][12] = floatstr (temp);
	        cache_get_field_content(kv, "enter_x14", temp), KV_DATA[kv][data_ENTER_POSX][13] = floatstr (temp);
	        cache_get_field_content(kv, "enter_y14", temp), KV_DATA[kv][data_ENTER_POSY][13] = floatstr (temp);
	        cache_get_field_content(kv, "enter_z14", temp), KV_DATA[kv][data_ENTER_POSZ][13] = floatstr (temp);

	        cache_get_field_content(kv, "exit_x1", temp), KV_DATA[kv][data_EXIT_POSX][0] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y1", temp), KV_DATA[kv][data_EXIT_POSY][0] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z1", temp), KV_DATA[kv][data_EXIT_POSZ][0] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x2", temp), KV_DATA[kv][data_EXIT_POSX][1] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y2", temp), KV_DATA[kv][data_EXIT_POSY][1] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z2", temp), KV_DATA[kv][data_EXIT_POSZ][1] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x3", temp), KV_DATA[kv][data_EXIT_POSX][2] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y3", temp), KV_DATA[kv][data_EXIT_POSY][2] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z3", temp), KV_DATA[kv][data_EXIT_POSZ][2] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x4", temp), KV_DATA[kv][data_EXIT_POSX][3] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y4", temp), KV_DATA[kv][data_EXIT_POSY][3] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z4", temp), KV_DATA[kv][data_EXIT_POSZ][3] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x5", temp), KV_DATA[kv][data_EXIT_POSX][4] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y5", temp), KV_DATA[kv][data_EXIT_POSY][4] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z5", temp), KV_DATA[kv][data_EXIT_POSZ][4] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x6", temp), KV_DATA[kv][data_EXIT_POSX][5] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y6", temp), KV_DATA[kv][data_EXIT_POSY][5] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z6", temp), KV_DATA[kv][data_EXIT_POSZ][5] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x7", temp), KV_DATA[kv][data_EXIT_POSX][6] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y7", temp), KV_DATA[kv][data_EXIT_POSY][6] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z7", temp), KV_DATA[kv][data_EXIT_POSZ][6] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x8", temp), KV_DATA[kv][data_EXIT_POSX][7] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y8", temp), KV_DATA[kv][data_EXIT_POSY][7] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z8", temp), KV_DATA[kv][data_EXIT_POSZ][7] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x9", temp), KV_DATA[kv][data_EXIT_POSX][8] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y9", temp), KV_DATA[kv][data_EXIT_POSY][8] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z9", temp), KV_DATA[kv][data_EXIT_POSZ][8] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x10", temp), KV_DATA[kv][data_EXIT_POSX][9] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y10", temp), KV_DATA[kv][data_EXIT_POSY][9] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z10", temp), KV_DATA[kv][data_EXIT_POSZ][9] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x11", temp), KV_DATA[kv][data_EXIT_POSX][10] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y11", temp), KV_DATA[kv][data_EXIT_POSY][10] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z11", temp), KV_DATA[kv][data_EXIT_POSZ][10] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x12", temp), KV_DATA[kv][data_EXIT_POSX][11] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y12", temp), KV_DATA[kv][data_EXIT_POSY][11] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z12", temp), KV_DATA[kv][data_EXIT_POSZ][11] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x13", temp), KV_DATA[kv][data_EXIT_POSX][12] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y13", temp), KV_DATA[kv][data_EXIT_POSY][12] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z13", temp), KV_DATA[kv][data_EXIT_POSZ][12] = floatstr (temp);
	        cache_get_field_content(kv, "exit_x14", temp), KV_DATA[kv][data_EXIT_POSX][13] = floatstr (temp);
	        cache_get_field_content(kv, "exit_y14", temp), KV_DATA[kv][data_EXIT_POSY][13] = floatstr (temp);
	        cache_get_field_content(kv, "exit_z14", temp), KV_DATA[kv][data_EXIT_POSZ][13] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx1", temp), KV_DATA[kv][data_CAR_POSX][0] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy1", temp), KV_DATA[kv][data_CAR_POSY][0] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz1", temp), KV_DATA[kv][data_CAR_POSZ][0] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa1", temp), KV_DATA[kv][data_CAR_POSA][0] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx2", temp), KV_DATA[kv][data_CAR_POSX][1] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy2", temp), KV_DATA[kv][data_CAR_POSY][1] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz2", temp), KV_DATA[kv][data_CAR_POSZ][1] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa2", temp), KV_DATA[kv][data_CAR_POSA][1] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx3", temp), KV_DATA[kv][data_CAR_POSX][2] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy3", temp), KV_DATA[kv][data_CAR_POSY][2] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz3", temp), KV_DATA[kv][data_CAR_POSZ][2] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa3", temp), KV_DATA[kv][data_CAR_POSA][2] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx4", temp), KV_DATA[kv][data_CAR_POSX][3] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy4", temp), KV_DATA[kv][data_CAR_POSY][3] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz4", temp), KV_DATA[kv][data_CAR_POSZ][3] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa4", temp), KV_DATA[kv][data_CAR_POSA][3] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx5", temp), KV_DATA[kv][data_CAR_POSX][4] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy5", temp), KV_DATA[kv][data_CAR_POSY][4] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz5", temp), KV_DATA[kv][data_CAR_POSZ][4] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa5", temp), KV_DATA[kv][data_CAR_POSA][4] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx6", temp), KV_DATA[kv][data_CAR_POSX][5] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy6", temp), KV_DATA[kv][data_CAR_POSY][5] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz6", temp), KV_DATA[kv][data_CAR_POSZ][5] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa6", temp), KV_DATA[kv][data_CAR_POSA][5] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx7", temp), KV_DATA[kv][data_CAR_POSX][6] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy7", temp), KV_DATA[kv][data_CAR_POSY][6] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz7", temp), KV_DATA[kv][data_CAR_POSZ][6] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa7", temp), KV_DATA[kv][data_CAR_POSA][6] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx8", temp), KV_DATA[kv][data_CAR_POSX][7] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy8", temp), KV_DATA[kv][data_CAR_POSY][7] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz8", temp), KV_DATA[kv][data_CAR_POSZ][7] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa8", temp), KV_DATA[kv][data_CAR_POSA][7] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx9", temp), KV_DATA[kv][data_CAR_POSX][8] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy9", temp), KV_DATA[kv][data_CAR_POSY][8] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz9", temp), KV_DATA[kv][data_CAR_POSZ][8] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa9", temp), KV_DATA[kv][data_CAR_POSA][8] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx10", temp), KV_DATA[kv][data_CAR_POSX][9] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy10", temp), KV_DATA[kv][data_CAR_POSY][9] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz10", temp), KV_DATA[kv][data_CAR_POSZ][9] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa10", temp), KV_DATA[kv][data_CAR_POSA][9] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx11", temp), KV_DATA[kv][data_CAR_POSX][10] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy11", temp), KV_DATA[kv][data_CAR_POSY][10] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz11", temp), KV_DATA[kv][data_CAR_POSZ][10] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa11", temp), KV_DATA[kv][data_CAR_POSA][10] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx12", temp), KV_DATA[kv][data_CAR_POSX][11] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy12", temp), KV_DATA[kv][data_CAR_POSY][11] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz12", temp), KV_DATA[kv][data_CAR_POSZ][11] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa12", temp), KV_DATA[kv][data_CAR_POSA][11] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx13", temp), KV_DATA[kv][data_CAR_POSX][12] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy13", temp), KV_DATA[kv][data_CAR_POSY][12] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz13", temp), KV_DATA[kv][data_CAR_POSZ][12] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa13", temp), KV_DATA[kv][data_CAR_POSA][12] = floatstr (temp);

	        cache_get_field_content(kv, "car_posx14", temp), KV_DATA[kv][data_CAR_POSX][13] = floatstr (temp);
	        cache_get_field_content(kv, "car_posy14", temp), KV_DATA[kv][data_CAR_POSY][13] = floatstr (temp);
	        cache_get_field_content(kv, "car_posz14", temp), KV_DATA[kv][data_CAR_POSZ][13] = floatstr (temp);
	        cache_get_field_content(kv, "car_posa14", temp), KV_DATA[kv][data_CAR_POSA][13] = floatstr (temp);

	        TotalKV++;

            KV_DATA[kv][data_PICK_ENTER] = CreateDynamicPickup(1318, 23, KV_DATA[kv][data_ENTER_X], KV_DATA[kv][data_ENTER_Y], KV_DATA[kv][data_ENTER_Z],0);
			KV_DATA[kv][data_PICK_EXIT] = CreateDynamicPickup(1318, 23, KV_DATA[kv][data_EXIT_X], KV_DATA[kv][data_EXIT_Y], KV_DATA[kv][data_EXIT_Z],KV_DATA[kv][data_ID]);

			format(str1,sizeof(str1), "{66FF66}Подъезд №%d\n{FFCC00}Для входа нажмите 'ALT'",kv+1);
   			KV_DATA[kv][data_INF_ENTER] = CreateDynamic3DTextLabel(str1, -1, KV_DATA[kv][data_ENTER_X], KV_DATA[kv][data_ENTER_Y], KV_DATA[kv][data_ENTER_Z], 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0);
   			KV_DATA[kv][data_INF_EXIT] = CreateDynamic3DTextLabel("{FFCC00}Для выхода нажмите 'ALT'", -1, KV_DATA[kv][data_EXIT_X], KV_DATA[kv][data_EXIT_Y], KV_DATA[kv][data_EXIT_Z], 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]);
			new owner[MAX_PLAYER_NAME], class_kv[8],kk;
			for(new k = 0; k < 14; k++)
			{
				switch(k)
				{
				    case 0: strmid(owner, KV_DATA[kv][data_OWNER_1], 0, strlen(KV_DATA[kv][data_OWNER_1]), MAX_PLAYER_NAME);
				    case 1: strmid(owner, KV_DATA[kv][data_OWNER_2], 0, strlen(KV_DATA[kv][data_OWNER_2]), MAX_PLAYER_NAME);
				    case 2: strmid(owner, KV_DATA[kv][data_OWNER_3], 0, strlen(KV_DATA[kv][data_OWNER_3]), MAX_PLAYER_NAME);
				    case 3: strmid(owner, KV_DATA[kv][data_OWNER_4], 0, strlen(KV_DATA[kv][data_OWNER_4]), MAX_PLAYER_NAME);
				    case 4: strmid(owner, KV_DATA[kv][data_OWNER_5], 0, strlen(KV_DATA[kv][data_OWNER_5]), MAX_PLAYER_NAME);
				    case 5: strmid(owner, KV_DATA[kv][data_OWNER_6], 0, strlen(KV_DATA[kv][data_OWNER_6]), MAX_PLAYER_NAME);
				    case 6: strmid(owner, KV_DATA[kv][data_OWNER_7], 0, strlen(KV_DATA[kv][data_OWNER_7]), MAX_PLAYER_NAME);
				    case 7: strmid(owner, KV_DATA[kv][data_OWNER_8], 0, strlen(KV_DATA[kv][data_OWNER_8]), MAX_PLAYER_NAME);
				    case 8: strmid(owner, KV_DATA[kv][data_OWNER_9], 0, strlen(KV_DATA[kv][data_OWNER_9]), MAX_PLAYER_NAME);
				    case 9: strmid(owner, KV_DATA[kv][data_OWNER_10], 0, strlen(KV_DATA[kv][data_OWNER_10]), MAX_PLAYER_NAME);
				    case 10: strmid(owner, KV_DATA[kv][data_OWNER_11], 0, strlen(KV_DATA[kv][data_OWNER_11]), MAX_PLAYER_NAME);
				    case 11: strmid(owner, KV_DATA[kv][data_OWNER_12], 0, strlen(KV_DATA[kv][data_OWNER_12]), MAX_PLAYER_NAME);
				    case 12: strmid(owner, KV_DATA[kv][data_OWNER_13], 0, strlen(KV_DATA[kv][data_OWNER_13]), MAX_PLAYER_NAME);
				    case 13: strmid(owner, KV_DATA[kv][data_OWNER_14], 0, strlen(KV_DATA[kv][data_OWNER_14]), MAX_PLAYER_NAME);

				}
				switch(KV_DATA[kv][data_CLASS][k])
				{
				    case 0: class_kv = "Эконом";
				    case 1: class_kv = "Средний";
				    case 2: class_kv = "Элитный";
    			}
				if(KV_DATA[kv][data_OWNED][k] == 0)
			    {
                    format(str,sizeof(str), "{66FF66}Квартира №%d\n{6699CC}Класс: {FFFFFF}%s\n{6699CC}Стоимость: {FFFFFF}%d рублей\n{FFCC00}Для покупки используйте: /buy",k+1, class_kv, KV_DATA[kv][data_PRICE][k]);
		 	        KV_DATA[kv][data_INFO][k] = CreateDynamic3DTextLabel(str, -1, KV_DATA[kv][data_ENTER_POSX][k], KV_DATA[kv][data_ENTER_POSY][k], KV_DATA[kv][data_ENTER_POSZ][k], 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]);
			    }
			    else
			    {
			        kk++;
			        format(str,sizeof(str), "{66FF66}Квартира №%d\n{6699CC}Класс: {FFFFFF}%s\n{6699CC}Владелец: {FFFFFF}%s",k+1, class_kv, owner);
		 	        KV_DATA[kv][data_INFO][k] = CreateDynamic3DTextLabel(str, -1, KV_DATA[kv][data_ENTER_POSX][k], KV_DATA[kv][data_ENTER_POSY][k], KV_DATA[kv][data_ENTER_POSZ][k], 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]);
		 	        switch(KV_DATA[kv][data_CLASS])
		 	        {
	            		case 0:
	 	            	{
						 	KV_DATA[kv][data_GARDEROB][k] = CreateDynamic3DTextLabel("Переодеться 'Н'", -1, 156.8697,503.9488,1102.0000, 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]+k);
						}
	     				case 1:
	         			{
				 			KV_DATA[kv][data_GARDEROB][k] = CreateDynamic3DTextLabel("Переодеться 'Н'", -1, 145.0982,492.6682,2002.0000, 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]+k);
			 			}
	      				case 2:
	          			{
							KV_DATA[kv][data_GARDEROB][k] = CreateDynamic3DTextLabel("Переодеться 'Н'", -1, 141.1772,498.9918,1527.4100, 5.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,KV_DATA[kv][data_ID]+k);
						}
		 	        }
			    }
			}
   			if(kk == 14)
			{
			    KV_DATA[kv][data_MAPICON] = CreateDynamicMapIcon(KV_DATA[kv][data_ENTER_X],KV_DATA[kv][data_ENTER_Y],KV_DATA[kv][data_ENTER_Z], 32, -1, 0, -1, -1, 100.0);
			}
			else
			{
			    KV_DATA[kv][data_MAPICON] = CreateDynamicMapIcon(KV_DATA[kv][data_ENTER_X],KV_DATA[kv][data_ENTER_Y],KV_DATA[kv][data_ENTER_Z], 31, -1, 0, -1, -1, 100.0);
			}
        }
        printf("[serv_log]  Load kvartiry. Load: %d b. Time: %d ms.",TotalKV,GetTickCount()-time);
  	}
    return true;
}

 

 

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

    • x_SkYAs_x
      By x_SkYAs_x
      Здравствуйте,я хотел бы узнать,как убрать миниганы с мопеда(мод Аризона РП)