21.10.2014, 06:59
(
Последний раз редактировалось Neil.; 21.10.2014 в 08:00.
)
In my script, I can create a company. Members are allowed to apply in said company. There's no limit as to how many can apply. Though now I have a problem on how to show members of the company (incl. those offline players). Here's my airline enumeration if that matters.
I'm using MySQL
When one executes the command: /members, should I make a query right there and then? or should I use an enum? The number of employees is ambiguous and changes so creating an enum (as I have thought) isn't efficient than constantly querying on the players table. How would I go about doing it? Thanks in advance!
pawn Код:
enum companyData
{
//Credentials
ID,
companyname[MAX_COMPANY_NAME],
code[5],
location[MAX_ZONE_NAME],
//Stats
funds,
totalrevenue,
assets,
forsale,
price,
//Others
motto[128],
announcement[128],
foundedon[MAX_TIMESTAMP_LEN],
//Player
Founder_ID,
CEO_ID,
CIO_ID,
CFO_ID,
HeadManager_ID,
//Spawns
Float:office_x,
Float:office_y,
Float:office_z,
Float:spawn_x,
Float:spawn_y,
Float:spawn_z,
//Non SQL
Text3D:textidx,
pickupidx,
mapidx,
transferownershipID,
}
new companyInfo[MAX_COMPANY][companyData];
When one executes the command: /members, should I make a query right there and then? or should I use an enum? The number of employees is ambiguous and changes so creating an enum (as I have thought) isn't efficient than constantly querying on the players table. How would I go about doing it? Thanks in advance!