Max Ganglockers Problem
#5

Код:
stock SaveGangLocker(id)
{
	new string[1024];
	format(string, sizeof(string), "UPDATE `ganglockers` SET \
		`PosX`=%f, \
		`PosY`=%f, \
		`PosZ`=%f, \
		`VW`=%d, \
		`Int`=%d, \
		`Type`=%d, \
		`Family`=%d WHERE `id`=%d",
		GangLockers[id][glockerPosX],
		GangLockers[id][glockerPosY],
		GangLockers[id][glockerPosZ],
		GangLockers[id][glockerVW],
		GangLockers[id][glockerInt],
		GangLockers[id][glockerType],
		GangLockers[id][glockerFamily],
		id+1
	);

	mysql_function_query(MainPipeline, string, false, "OnQueryFinish", "i", SENDDATA_THREAD);
}
Idk if this help too
Код:
stock SaveGangLockers()
{
	for(new i = 0; i < MAX_GANGLOCKER; i++)
	{
		SaveGangLocker(i);
	}
	return 1;
}

stock RehashGangLocker(id)
{
	DestroyDynamic3DTextLabel(GangLockers[id][glockerTextID]);
	GangLockers[id][glockerSQLId] = 1;
	GangLockers[id][glockerPosX] = 0.0;
	GangLockers[id][glockerPosY] = 0.0;
	GangLockers[id][glockerPosZ] = 0.0;
	GangLockers[id][glockerVW] = 0;
	GangLockers[id][glockerInt] = 0;
	GangLockers[id][glockerType] = 0;
	GangLockers[id][glockerFamily] = 0;
	LoadGangLocker(id);
}

stock RehashGangLockers()
{
	printf("[RehashGangLockers] Deleting Gang Lockers from server...");
	for(new i = 0; i < MAX_GANGLOCKER; i++)
	{
		RehashGangLocker(i);
	}
	LoadGangLockers();
}

stock LoadGangLocker(id)
{
	new string[128];
	format(string, sizeof(string), "SELECT * FROM `ganglockers` WHERE `id`=%d", id);
	mysql_function_query(MainPipeline, string, true, "OnLoadGangLocker", "i", id);
}

stock LoadGangLockers()
{
	printf("[LoadGangLockers] Loading data from database...");
	mysql_function_query(MainPipeline, "SELECT * FROM `ganglockers`", true, "OnLoadGangLockers", "");
}
Reply


Messages In This Thread
Max Ganglockers Problem - by PierreMarley - 21.11.2017, 11:43
Re: Max Ganglockers Problem - by pollo97 - 21.11.2017, 11:55
Re: Max Ganglockers Problem - by PierreMarley - 21.11.2017, 14:12
Re: Max Ganglockers Problem - by Twizted - 21.11.2017, 14:23
Re: Max Ganglockers Problem - by PierreMarley - 21.11.2017, 16:51
Re: Max Ganglockers Problem - by mirou123 - 21.11.2017, 18:23
Re: Max Ganglockers Problem - by PierreMarley - 21.11.2017, 21:21
Re: Max Ganglockers Problem - by Meller - 21.11.2017, 21:28

Forum Jump:


Users browsing this thread: 2 Guest(s)