28.08.2015, 19:11
Fixed.
Example:
You can also add:
Example:
PHP код:
#define MAX_BUSINESS (1000)
enum E_BUSINESS {
BUSINESS_NAME1[24], // is string
BUSINESS_NAME2[24],
BUSINESS_NAME3[24],
BUSINESS_COST1, // is integer
BUSINESS_COST2,
BUSINESS_COST3
}
new business[MAX_BUSINESS][E_BUSINESS]; // declaration
main()
{
format(business[0][BUSINESS_NAME1], 24, "%s", "My Bussuname"); // set business name
business[0][BUSINESS_COST1] = 10000; // set business cost
for (new i; i < MAX_BUSINESS; i++) {
printf("index %d bussuname '%s' cost $%d", i, business[i][BUSINESS_NAME1], business[i][BUSINESS_COST1]); // Show all business
}
}
PHP код:
enum E_BUSINESS {
BUSINESS_NAME1[24], // is string
BUSINESS_NAME2[24],
BUSINESS_NAME3[24],
BUSINESS_COST1, // is integer
BUSINESS_COST2,
BUSINESS_COST3,
BUSINESS_OWNERS[MAX_PLAYERS] // is integer
}
main()
{
format(business[0][BUSINESS_NAME1], 24, "%s", "My Bussuname"); // set business name
business[0][BUSINESS_COST1] = 10000; // set business cost
business[0][BUSINESS_OWNERS][0] = 1; // set business stat for player ID 0
for (new i; i < MAX_BUSINESS; i++) {
printf("index %d bussuname '%s' cost $%d", i, business[i][BUSINESS_NAME1], business[i][BUSINESS_COST1]); // Show all business
}
}