The way store variable Texture for Furniture ?
#1

Hello, im gona create the Furniture System, all thing it cool but after complete that all i got a problem. How to save Material for Furniture ? Mah Furniture System array using on House Enum.

Quote:

enum houseparams
{
hID,
hOwner,
hName[64],
hEnterVW,
hEnterInt,
hExitVW,
hExitInt,
hPickup,
Float:hExPos[4],
Float:hIntPos[4],
Text3D:hText3D[2],
// Furniture
hFurID[MAX_FURNITURE],
hFurModel[MAX_FURNITURE],
hFurniture[MAX_FURNITURE],
Float:hFurPosX[MAX_FURNITURE],
Float:hFurPosY[MAX_FURNITURE],
Float:hFurPosZ[MAX_FURNITURE],
Float:hFurRotX[MAX_FURNITURE],
Float:hFurRotY[MAX_FURNITURE],
Float:hFurRotZ[MAX_FURNITURE],
hFurVW[MAX_FURNITURE],
hFurInt[MAX_FURNITURE],
}
new House[MAX_HOUSES][houseparams];

That okey, but that can't not use array for String Variable for store Txd Name and TextureName like TxdName[16][MAX_FURNITURE].

Quote:

Example:
enum params
{
furTxdName[16][MAX_FURNITURE],
furTextureName[16][MAX_FURNITURE],
}
new House[MAX_HOUSES][houseparams];

If i take out Furniture Variable from House Enum using new variable like Furniture[MAX_HOUSE][MAX_FURNITURE][params]. That make my gamemode really big capacity. (5mb to 49 or 50mb). Do we have the way for store that thing without increase gamemode capacity ? Thank for the help.
Reply
#2

errrm, you realize you have created the same var twice?

Код:
new House[MAX_HOUSES][houseparams];
also, what the hell are you doing?
Please go learn how enums work, as this is not efficient in the slightest.

Код:
enum E_HOUSE_FURNITURE
{
furTxdName[16],
furTextureName[16],
}
new FurnitureMaterials[ MAX_FURNITURE ][ E_HOUSE_FURNITURE ];
example of using it
Код:
return FurnitureMaterials[ 0 ][ furTextureName ]; // Returns the name of the texture in slot ( 0 )
maybe take a look at: A house system with a furniture system
Reply
#3

Quote:
Originally Posted by azzerking
Посмотреть сообщение
errrm, you realize you have created the same var twice?

Код:
new House[MAX_HOUSES][houseparams];
also, what the hell are you doing?
Please go learn how enums work, as this is not efficient in the slightest.

Код:
enum E_HOUSE_FURNITURE
{
furTxdName[16],
furTextureName[16],
}
new FurnitureMaterials[ MAX_FURNITURE ][ E_HOUSE_FURNITURE ];
example of using it
Код:
return FurnitureMaterials[ 0 ][ furTextureName ]; // Returns the name of the texture in slot ( 0 )
maybe take a look at: A house system with a furniture system
Nah, u have no idea about my work. The way like u Furniture is not per HOUSE u know ? And sometime when u people using Furniture much as MAX_FURNITURE, u must increase that, so if Max Furniture per house your people can using is 100 > 150 and the houses on your server is 100 then how much MAX_FURNITURE u need ? 5.000 ? or 10.000 is enough? That way i was using early for my Furniture System, and mah people using about 500+ per week (on Exterior/Interior). So i need to change that Furniture to per house.

Anyway my english is bad, i can't explain all that things and i just remove that variable and using Mysql Callbacks Texture for this, that is the best way i think.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)