Question about ENUMS.
#1

If I have about seven enums in total which contains more than 100 info or more.
for example:

pawn Код:
enum HOUSE_INFO
{
    hID,
    Text3D:hLabel,
    hCheckPoint,
    Float:hEntranceX,
    Float:hEntranceY,
    Float:hEntranceZ,
    Float:hExitX,
    Float:hExitY,
    Float:hExitZ,
    hInfo[128],
    hOwner[MAX_PLAYER_NAME],
    hOwned,
    hLocked,
    hPrice,
    hLevelbuy,
    hRentprice,
    hRentable,
    hInterior,
    hWorld,
    hCash,
    hFurnitures,
    hHouseOn,
    Float:hCheckPosX,
    Float:hCheckPosY,
    Float:hCheckPosZ
};
new HouseInfo[MAX_HOUSES][HOUSE_INFO];

enum FURNITURE_INFO
{
    fID,
    fModel,
    fObject,
    fName[128],
    fHouseID,
    fInterior,
    fVirtualWorld,
    fMarketPrice,
    Float:fPosX,
    Float:fPosY,
    Float:fPosZ,
    Float:fPosRX,
    Float:fPosRY,
    Float:fPosRZ,
    fOn,
}
new FurnitureInfo[MAX_HOUSES][MAX_FURNITURE][FURNITURE_INFO];

The max houses is 600 and there's furniture ENUM for each house, max furniture for each house is 50.
so if 600 houses will contain 50 furniture, there will be tons of lags?
thanks in advance.
Reply
#2

Just a little off topic question.. why would you ever need 600 houses?
Reply
#3

Quote:
Originally Posted by Denying
Посмотреть сообщение
Just a little off topic question.. why would you ever need 600 houses?
Agreed
Reply
#4

Have neither of you two been in a populated server before?

@OP: No, it will be fine.
Reply
#5

What is the problem about 600 houses??
I'm making a roleplay gamemode from scratch so...
take a look at ls-rp?
1000 houses, 500 businesses.
I wonder what they're using to save data
Reply
#6

I used to play in a very popular server before, the amount of players that the server had daily was/is(?) 200 and it had about 400 houses, maybe 450. And that's 150 houses less. 150 is alot.

Sorry for going off topic. Anyway good luck with your server. xD
Reply
#7

there will be no problem, just the size will increase.
if u want to narrow it down u can use arrays it could slow it down with a couple ms unnoticeable when playing though.
Reply
#8

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
there will be no problem, just the size will increase.
if u want to narrow it down u can use arrays it could slow it down with a couple ms unnoticeable when playing though.
What? Do you have any sort of documentation to support that statement?
Reply
#9

Quote:
Originally Posted by PaulDinam
Посмотреть сообщение
What is the problem about 600 houses??
I'm making a roleplay gamemode from scratch so...
take a look at ls-rp?
1000 houses, 500 businesses.
I wonder what they're using to save data
They're probably getting the data directly from the database, rather than trying to fruitlessly duplicate it in the gamemode. Fixed-size arrays are no good for arbitrary amounts of items. You can essentially have two pieces of furniture in a house, wasting the other 48 slots.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)