Size gets big +rep
#8

Fixed.

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 iMAX_BUSINESSi++) {
          
printf("index %d bussuname '%s' cost $%d"ibusiness[i][BUSINESS_NAME1], business[i][BUSINESS_COST1]); // Show all business
    
}  

You can also add:
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 iMAX_BUSINESSi++) {
          
printf("index %d bussuname '%s' cost $%d"ibusiness[i][BUSINESS_NAME1], business[i][BUSINESS_COST1]); // Show all business
    
}  

Reply


Messages In This Thread
Size gets big +rep - by iBots - 28.08.2015, 12:31
Re: Size gets big +rep - by Isolated - 28.08.2015, 12:34
Re: Size gets big +rep - by iBots - 28.08.2015, 13:40
Re: Size gets big +rep - by Logofero - 28.08.2015, 15:45
Re: Size gets big +rep - by iBots - 28.08.2015, 18:16
Re: Size gets big +rep - by iBots - 28.08.2015, 18:18
Re: Size gets big +rep - by Sew_Sumi - 28.08.2015, 18:51
Re: Size gets big +rep - by Logofero - 28.08.2015, 19:11
Re: Size gets big +rep - by Rodri99 - 28.08.2015, 19:51
Re: Size gets big +rep - by iBots - 28.08.2015, 20:31

Forum Jump:


Users browsing this thread: 1 Guest(s)