SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 21/06/2012, 03:24 PM   #1
Edvin
Gangsta
 
Edvin's Avatar
 
Join Date: Dec 2010
Posts: 868
Reputation: 71
Default Pickups/3DTexts don't show on house pickups - Help !

Hi all !

I have a problem with function "LoadHouses( )" ...
Here is the code:
Code:
mysql_store_result( );
            
            gsString[ 0 ] = EOS;
            new
                Field[ 128 ],
                X
			;

			if ( mysql_num_rows( ) == 0 )
			{
			    print( "--- There are 0 houses in the database! ---" );
				mysql_free_result( );
				return 1;
			}
			else
			{
				while( mysql_retrieve_row( ) )
				{
				    mysql_fetch_field_row( Field, "HouseID" ); 		X = strval( Field );
				    mysql_fetch_field_row( Field, "Name" ); 		format( H_DATA[ i ][ Name ], 25, "%s", Field );
					mysql_fetch_field_row( Field, "Cost" ); 		H_DATA[ X ][ Cost ] 		= strval( Field );
				    mysql_fetch_field_row( Field, "Sell" ); 		H_DATA[ X ][ Sell ] 		= strval( Field );
				    mysql_fetch_field_row( Field, "Interior" ); 	H_DATA[ X ][ Interior ] 	= strval( Field );
				    mysql_fetch_field_row( Field, "Locked" ); 		H_DATA[ X ][ Locked ] 		= strval( Field );
				    mysql_fetch_field_row( Field, "VirtualWorld" ); H_DATA[ X ][ Virtualworld ] = strval( Field );
				    mysql_fetch_field_row( Field, "IntX" ); 		H_DATA[ X ][ InteriorX ] 	= floatstr( Field );
				    mysql_fetch_field_row( Field, "IntY" ); 		H_DATA[ X ][ InteriorY ] 	= floatstr( Field );
				    mysql_fetch_field_row( Field, "IntZ" );			H_DATA[ X ][ InteriorZ ] 	= floatstr( Field );
					mysql_fetch_field_row( Field, "HouseX" ); 		H_DATA[ X ][ iconx ] 		= floatstr( Field );
					mysql_fetch_field_row( Field, "HouseY" ); 		H_DATA[ X ][ icony ] 		= floatstr( Field );
					mysql_fetch_field_row( Field, "HouseZ" ); 		H_DATA[ X ][ iconz ] 		= floatstr( Field );
					mysql_fetch_field_row( Field, "Rent" ); 		H_DATA[ X ][ Rent ] 		= strval( Field );

					if ( strcmp( H_DATA[ X ][ Name ], "ForSale", true ) == 0 )
						HousePickup[ X ] = CreateDynamicPickup( 1273, 23, H_DATA[ X ][ iconx ], H_DATA[ X ][ icony ], H_DATA[ X ][ iconz ] );	//not bought
					else
						HousePickup[ X ] = CreateDynamicPickup( 1272, 23, H_DATA[ X ][ iconx ], H_DATA[ X ][ icony ], H_DATA[ X ][ iconz ] );	//bought

					format( gsString, sizeof( gsString ), "{FF9900}Owned by\n{00FF00}%s", H_DATA[ X ][ Name ] );
					housei[ X ] = CreateDynamic3DTextLabel( gsString, 0x00808088, H_DATA[ X ][ iconx ], H_DATA[ X ][ icony ], H_DATA[ X ][ iconz ], 30.0 );
				}
			}
			printf( "%d houses loaded", X );
		}
all work fine, it print "1201 houses loaded" in console, but when i enter the game, the 3DTexts and Pickups don't appear ... what is the problem ?

PS> Sorry for bad code identitation

Last edited by Edvin; 21/06/2012 at 07:55 PM.
Edvin is offline   Reply With Quote
Old 21/06/2012, 08:50 PM   #2
Edvin
Gangsta
 
Edvin's Avatar
 
Join Date: Dec 2010
Posts: 868
Reputation: 71
Default Re: Pickups/3DTexts don't show on house pickups - Help !

Bump Up!

Anyone? ... please help me
Edvin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pickups wont show up. Shetch Scripting Help 0 18/02/2012 02:02 AM
Pickups dont show ? Jimbo01 Help Archive 0 01/07/2011 08:49 PM
Pickups won't show. Carlton Help Archive 0 18/03/2010 09:28 PM
My pickups don't show [BEP]AcerPilot Help Archive 13 27/02/2010 08:51 PM
PickUps Won't Show/Spawn sidhu123 Help Archive 48 23/05/2009 05:28 PM


All times are GMT. The time now is 10:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.