House System Problem
#1

I've created a house system and the pickup doesn't create

Code:
Код:
forward LoadHouses();
public LoadHouses()
{
	new rows;
	cache_get_row_count(rows);

	if(rows)
	{
		new id, loaded;
		for(new i = 0; i < rows; i++) {
			cache_get_value_name_int(loaded, "ID", id);
			cache_get_value_name_float(loaded, "EnterX", hInfo[id][hEnterX]);
			cache_get_value_name_float(loaded, "EnterY", hInfo[id][hEnterY]);
			cache_get_value_name_float(loaded, "EnterZ", hInfo[id][hEnterZ]);
			cache_get_value_name_float(loaded, "ExitX", hInfo[id][hExitX]);
			cache_get_value_name_float(loaded, "ExitX", hInfo[id][hExitY]);
			cache_get_value_name_float(loaded, "ExitY", hInfo[id][hExitZ]);
			cache_get_value_name_float(loaded, "ExitZ", hInfo[id][hExitX]);
			cache_get_value_name_int(loaded, "InsideInt", hInfo[id][hInsideInt]);
			cache_get_value_name_int(loaded, "InsideVir", hInfo[id][hInsideVir]);
			cache_get_value_name_int(loaded, "OutsideInt", hInfo[id][hOutsideInt]);
			cache_get_value_name_int(loaded, "Level", hInfo[id][hLevel]);
			cache_get_value_name(loaded, "Owner", hInfo[id][hOwner], 48);
			cache_get_value_name_int(loaded, "Price", hInfo[id][hPrice]);

			new string[255];
			format(string, sizeof(string), "House %d, x: %d, y:%d, z:%d", id, hInfo[id][hEnterX], hInfo[id][hEnterY], hInfo[id][hEnterZ]);
			print(string);

			loaded++;

			hInfo[id][hPickup] = CreatePickup(1273, 0, hInfo[id][hEnterX], hInfo[id][hEnterY], hInfo[id][hEnterZ], -1);
		}

		new string[255];
		format(string, sizeof(string), "Loaded %d houses from Database.", rows);
		print(string);
	}
	else
	{
		print("No house loaded on Database.");
		return 1;
	}
	return 1;
}
Reply


Messages In This Thread
House System Problem - by C0oL3r - 06.02.2018, 22:38
Re: House System Problem - by MarkNelson - 06.02.2018, 22:59
Re: House System Problem - by C0oL3r - 06.02.2018, 23:04
Re: House System Problem - by MarkNelson - 06.02.2018, 23:06
Re: House System Problem - by PepsiCola23 - 06.02.2018, 23:07
Re: House System Problem - by C0oL3r - 07.02.2018, 17:22
Re: House System Problem - by jasperschellekens - 07.02.2018, 17:56
Re: House System Problem - by C0oL3r - 07.02.2018, 18:05
Re: House System Problem - by jasperschellekens - 07.02.2018, 20:21
Re: House System Problem - by Mugala - 08.02.2018, 10:22

Forum Jump:


Users browsing this thread: 3 Guest(s)