Question about ENUMS. -
PaulDinam - 10.03.2013
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.
Re: Question about ENUMS. -
Denying - 10.03.2013
Just a little off topic question.. why would you ever need 600 houses?
Re: Question about ENUMS. -
iHaze. - 10.03.2013
Quote:
Originally Posted by Denying
Just a little off topic question.. why would you ever need 600 houses?
|
Agreed
Re: Question about ENUMS. -
Bakr - 10.03.2013
Have neither of you two been in a populated server before?
@OP: No, it will be fine.
Re: Question about ENUMS. -
PaulDinam - 10.03.2013
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
Re: Question about ENUMS. -
Denying - 10.03.2013
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
Re: Question about ENUMS. -
park4bmx - 10.03.2013
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.
Re: Question about ENUMS. -
Bakr - 10.03.2013
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?
Re: Question about ENUMS. -
Vince - 10.03.2013
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.