Hello Im trying to update mysql R6 version to R39 I tried search which command change the older one but I couldnt find.
I need only example how this should be changed to get used to.
Code:
FUNKCIJA:OnLoadBizzFurnitures( )
{
new content[ 512 ],
rows,
i = 0,
id,
count = GetTickCount(),
furnitureTexture1[30],
furnitureTexture2[30],
furnitureTexture3[30],
furnitureTexture4[30],
furnitureTexture5[30],
furnitureNon[] = "-1|-1|-1";
mysql_query( "SELECT * FROM `bfurniture`" );
mysql_store_result( );
rows = mysql_num_rows();
if ( rows )
{
while( mysql_retrieve_row() )
{
mysql_get_field("Id", content);
id = strval( content );
BizzFurniture[ id ][ fId ] = id;
mysql_get_field("ObjectId", content );
BizzFurniture[ id ][ fObjectId ] = strval( content );
mysql_get_field("BizId", content );
BizzFurniture[ id ][ fHouseId ] = strval( content );
mysql_get_field("TxdId0", furnitureTexture1 );
mysql_get_field("TxdId1", furnitureTexture2 );
mysql_get_field("TxdId2", furnitureTexture3 );
mysql_get_field("TxdId3", furnitureTexture4 );
mysql_get_field("TxdId4", furnitureTexture5 );
mysql_get_field("Name", BizzFurniture[ id ][ fName ] );
mysql_get_field("Pos_X", content);
BizzFurniture[ id ][ fPos ][ 0 ] = floatstr( content );
mysql_get_field("Pos_Y", content);
BizzFurniture[ id ][ fPos ][ 1 ] = floatstr( content );
mysql_get_field("Pos_Z", content);
BizzFurniture[ id ][ fPos ][ 2 ] = floatstr( content );
mysql_get_field("Pos_RX", content);
BizzFurniture[ id ][ frPos ][ 0 ] = floatstr( content );
mysql_get_field("Pos_RY", content);
BizzFurniture[ id ][ frPos ][ 1 ] = floatstr( content );
mysql_get_field("Pos_RZ", content);
BizzFurniture[ id ][ frPos ][ 2 ] = floatstr( content );
mysql_get_field("Price", content);
BizzFurniture[ id ][ fPrice ] = strval( content );
foreach(Biznes,b)
{
if( BizzFurniture[ id ][ fHouseId ] == bInfo[ b ][ bID ] )
{
bfObject[ id ] = CreateDynamicObject( BizzFurniture[ id ][ fObjectId ],
BizzFurniture[ id ][ fPos ][ 0 ], BizzFurniture[ id ][ fPos ][ 1 ], BizzFurniture[ id ][ fPos ][ 2 ],
BizzFurniture[ id ][ frPos ][ 0 ], BizzFurniture[ id ][ frPos ][ 1 ], BizzFurniture[ id ][ frPos ][ 2 ],
BUSINESS_VIRTUAL_WORLD+b );
break;
}
}
if( strcmp(furnitureTexture1, furnitureNon, false) )
{
new firstID, firstTexture[20], secondTexture[20], oObject, oTxdName[ 18 ], oTextureName[ 18 ], foColour;
sscanf(furnitureTexture1, "p<|>ds[20]s[20]", firstID, firstTexture, secondTexture);
GetDynamicObjectMaterial( bfObject[ id ], 0,
oObject, oTxdName, oTextureName, foColour );
SetDynamicObjectMaterial(bfObject[ id ], 0,
firstID,
firstTexture,
secondTexture,
foColour );
}
if( strcmp(furnitureTexture2, furnitureNon, false) )
{
new firstID, firstTexture[20], secondTexture[20], oObject, oTxdName[ 18 ], oTextureName[ 18 ], foColour;
sscanf(furnitureTexture2, "p<|>ds[20]s[20]", firstID, firstTexture, secondTexture);
GetDynamicObjectMaterial( bfObject[ id ], 1,
oObject, oTxdName, oTextureName, foColour );
SetDynamicObjectMaterial(bfObject[ id ], 1,
firstID,
firstTexture,
secondTexture,
foColour );
}
if( strcmp(furnitureTexture3, furnitureNon, false) )
{
new firstID, firstTexture[20], secondTexture[20], oObject, oTxdName[ 18 ], oTextureName[ 18 ], foColour;
sscanf(furnitureTexture3, "p<|>ds[20]s[20]", firstID, firstTexture, secondTexture);
GetDynamicObjectMaterial( bfObject[ id ], 2,
oObject, oTxdName, oTextureName, foColour );
SetDynamicObjectMaterial(bfObject[ id ], 2,
firstID,
firstTexture,
secondTexture,
foColour );
}
if( strcmp(furnitureTexture4, furnitureNon, false) )
{
new firstID, firstTexture[20], secondTexture[20], oObject, oTxdName[ 18 ], oTextureName[ 18 ], foColour;
sscanf(furnitureTexture4, "p<|>ds[20]s[20]", firstID, firstTexture, secondTexture);
GetDynamicObjectMaterial( bfObject[ id ], 3,
oObject, oTxdName, oTextureName, foColour );
SetDynamicObjectMaterial(bfObject[ id ], 3,
firstID,
firstTexture,
secondTexture,
foColour );
}
if( strcmp(furnitureTexture5, furnitureNon, false) )
{
new firstID, firstTexture[20], secondTexture[20], oObject, oTxdName[ 18 ], oTextureName[ 18 ], foColour;
sscanf(furnitureTexture5, "p<|>ds[20]s[20]", firstID, firstTexture, secondTexture);
GetDynamicObjectMaterial( bfObject[ id ], 4,
oObject, oTxdName, oTextureName, foColour );
SetDynamicObjectMaterial(bfObject[ id ], 4,
firstID,
firstTexture,
secondTexture,
foColour );
}
i++;
}
}
printf("[BIZNIO BALDAI] Ákrauta %d baldø per %d ms", i, GetTickCount() - count );
}