HOUSE LOADING WITH MYSQL.
#1

Hi i need help.

I have about 140 houses pickups in my server, but load just 100 and no more, maybe it's limit? and too i need help with loading maybe i do something wrong.

I create house with this function:

Код:
CreateHouse(model,type,Float:x,Float:y,Float:z,PRICE,INTERIOR,VIRTUALWORLD,Float:nX,Float:nY,Float:nZ)
one ex:

Код:
CreateHouse(1272,1,-169.1920,2707.3416,62.5352,40000,12,0,444.646911,508.239044,1001.419494); // HOUSE - 1.
And how i sad it's are about 140 all is same, just coordinates is different. OK now stock CreateHouse:

Код:
stock CreateHouse(model,type,Float:x,Float:y,Float:z,PRICE,INTERIOR,VIRTUALWORLD,Float:nX,Float:nY,Float:nZ)
{
	new Pick;
	Pick = CreatePickup(model,type,Float:x,Float:y,Float:z);
	printf(" PICKUP ID: %d", Pick );
	houseDB[Pick][hPrice] = kaina;
	houseDB[Pick][hInterior] = Interior;
	houseDB[Pick][hVirtualWorld] = vw;
        houseDB[Pick][hX] = x;
	houseDB[Pick][hY] = y;
	houseDB[Pick][hZ] = z;
	houseDB[Pick][huX] = nX;
	houseDB[Pick][huY] = nY;
	houseDB[Pick][huZ] = nZ;
	COUNTHOUSES ++;
	new Query[ 1500 ],savingstring[ 30 ],file[ 1500 ];
	format( Query,sizeof( Query ),"SELECT Owner FROM houses WHERE `house` = '%d'", Pick);
	mysql_query(Query);
	mysql_store_result();
	if(mysql_num_rows())
	if(mysql_fetch_row_format(savingstring))
	{
		sscanf(savingstring,"p<|>s",houseDB[Pick][owner_name] );
		houseDB[Pick][HouseLabel] = Create3DTextLabel("N",-1,houseDB[Pick][hX],houseDB[Pick][hY],houseDB[Pick][hZ],20, 0, 0);
		format(file,sizeof(file),"{FFA500}Namas: %d\nSavininkas: {FF0000}%s",COUNTHOUSES,houseDB[Pick][owner_name]);
		Update3DTextLabelText(houseDB[Pick][HouseLabel],-1,file);
		format(houseDB[ Pick ][ owner_name ],MAX_PLAYER_NAME,"%s",houseDB[ Pick ][ owner_name ] );
		printf( "HOUSEID: %d, OWNER: %s, X: %f, Y: %f, Z: %f", COUNTHOUSES, houseDB[Pick][owner_name], houseDB[Pick][hX],houseDB[Pick][hY],houseDB[Pick][hZ] );
	}
	if(!mysql_num_rows())
	{
		houseDB[Pick][HouseLabel] = Create3DTextLabel("N",-1,houseDB[Pick][hX],houseDB[Pick][hY],houseDB[Pick][hZ],20, 0, 0);
		format(file,sizeof(file),"{FFA500}Namas: %d\nKaina: {FF0000}%d {FFA500}LT",COUNTHOUSES,houseDB[Pick][nkaina]);
		Update3DTextLabelText(houseDB[Pick][HouseLabel],-1,file);
		strmid(houseDB[ Pick ][ owner_name ],"no",0,MAX_PLAYER_NAME,MAX_PLAYER_NAME);
		printf( "HOUSEID: %d, X: %f, Y: %f, Z: %f", COUNTHOUSES, houseDB[Pick][hX],houseDB[Pick][hY],houseDB[Pick][hZ] );
	}
	mysql_free_result();
}
Some server_log.txt:

Код:
[12:10:53]  PICKUP ID: 39
[12:10:53] HOUSEID: 1, X: -150.124694, Y: 2688.782714, Z: 62.429698
[12:10:53]  PICKUP ID: 40
[12:10:53] HOUSEID: 2, X: -169.192001, Y: 2707.341552, Z: 62.535198
[12:10:53]  PICKUP ID: 41
[12:10:53] HOUSEID: 3, X: -160.930694, Y: 2728.075439, Z: 62.191600
[12:10:53]  PICKUP ID: 42
[12:10:53] HOUSEID: 4, X: -155.958404, Y: 2758.251464, Z: 62.642799
[12:10:53]  PICKUP ID: 43
[12:10:53] HOUSEID: 5, X: -164.963806, Y: 2765.586181, Z: 62.675201
[12:10:53]  PICKUP ID: 44
[12:10:53] HOUSEID: 6, X: -201.785995, Y: 2772.675781, Z: 62.194599
[12:10:53]  PICKUP ID: 45
[12:10:53] HOUSEID: 7, X: -219.674697, Y: 2766.751953, Z: 62.687500
[12:10:53]  PICKUP ID: 46
[12:10:53] HOUSEID: 8, X: -232.987304, Y: 2807.549316, Z: 62.054698
[12:10:53]  PICKUP ID: 47
[12:10:53] HOUSEID: 9, X: -257.844085, Y: 2781.835693, Z: 62.687500
[12:10:53]  PICKUP ID: 48
[12:10:53] HOUSEID: 10, X: -269.116790, Y: 2769.492919, Z: 61.860099
[12:10:53]  PICKUP ID: 49
[12:10:53] HOUSEID: 11, X: -286.757293, Y: 2758.029296, Z: 62.512100
[12:10:53]  PICKUP ID: 50
And it's are until i reach " PICKUP ID: 100". But how i sad i have more. And i don't understand why it stop at 100...

My enum:

Код:
enum hitem
{
	Float:hX,
	Float:hY,
	Float:hZ,
	Float:huX,
	Float:huY,
	Float:huZ,
	nkaina,
	ninterior,
	nvirtualworld,
	owner_name[MAX_PLAYER_NAME],
	Text3D:HouseLabel,
}
new houseDB[ MAX_PLAYERS ][ hitem ];
and one new:

Код:
new COUNTHOUSES = 0;
When i come to server i see all labels, but how i sad i don't see all pickups.
Reply
#2

anyhelp?
Reply
#3

Are all your defines (such as max_players etc) set to be over 100? else the loop may be stopping when it reaches an early max.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)