[MySQL] Dealership Problem
#1

So I copyed this DS https://www.youtube.com/watch?v=1sETwYLz3cw to my GM.
It works perfect. Commands + system. But when I use /buyvehicle it dosen't load any vehicle from database.
So it shows me only the DS textdraws. On the original GM rg3 it works perfectly and load the DS Cars.
But on my GM it doesnt load anything.

Here are the codes:

Код:
function LoadDSVeh()
{
	dsvehs = cache_num_rows();
	for(new i = 1; i <= dsvehs; i++)
	{
		new j = i - 1;
		DSModels[i][dID] 				= i;
		DSModels[i][dModel]             = cache_get_field_content_int(j, "Model");
		DSModels[i][dPrice]             = cache_get_field_content_int(j, "Price");
		DSModels[i][dStock]             = cache_get_field_content_int(j, "Stock");
		DSModels[i][dDoors]             = cache_get_field_content_int(j, "Doors");
		cache_get_field_content(j, "Type", DSModels[i][dType], SQL, 129);
		DSModels[i][dMaxSpeed]          = cache_get_field_content_int(j, "MaxSpeed");
	}
	printf("[MYSQL] Dealership Vehicles: %d", dsvehs);
}
Код:
function LoadSystems()
{
	new query[128];
	mysql_format(SQL, query, sizeof(query), "SELECT * FROM `dsveh`");
	mysql_tquery(SQL, query, "LoadDSVeh", "");
	
}
Reply
#2

Plzz Helpp
Reply
#3

Why do you use j?

Try this:
Код:
function LoadDSVeh()
{
	dsvehs = cache_num_rows();
	for(new i = 1; i <= dsvehs; i++)
	{
		DSModels[i][dID] 				= i;
		DSModels[i][dModel]             = cache_get_field_content_int(i, "Model");
		DSModels[i][dPrice]             = cache_get_field_content_int(i, "Price");
		DSModels[i][dStock]             = cache_get_field_content_int(i, "Stock");
		DSModels[i][dDoors]             = cache_get_field_content_int(i, "Doors");
		cache_get_field_content(i, "Type", DSModels[i][dType], SQL, 129);
		DSModels[i][dMaxSpeed]          = cache_get_field_content_int(i, "MaxSpeed");
	}
	printf("[MYSQL] Dealership Vehicles: %d", dsvehs);
}
Reply
#4

Still not loading any car

http://s18.postimg.org/99jzh8u21/Untitled.png
Reply
#5

Quote:
Originally Posted by D0WN3D
Посмотреть сообщение
What did the printf print in the console?
Reply
#6

It didn't printed the message. Idk why.
Reply
#7

I use MySQL R34
Reply
#8

UP++
Reply
#9

any ideas??
Reply
#10

Upp+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)