31.05.2016, 15:58
The problem is you need an index for that.
For example:
So i hope you see..the index is the key
For example:
PHP код:
enum biz_Lists
{
biz_T,
biz_N[50],
}
new BizTypeList[10][biz_Lists]; //We make this to 10...so u can max create 10 Biz (index: 0-9)
new biz_index; //We will need this to accsess everytime the Variable
//To Create one Biz we do sth like this
if(biz_index >= sizeof(BizTypeList)) return SendClientMessage(playerid,-1,"Biz is full!"); //PS: sizeof(BizTypeList) = 10
BizTypeList[biz_index][biz_T] = BUSINESS_TYPE_BANK; //For example
format(BizTypeList[biz_index][biz_N],50, "Bank"); //So we set this
biz_index++; //we count this up...so the next one we insert is an index above
/*
To read this stuff out...you need an index
In my example the Bank is at index 0. Cause the Variable biz_index was zero.
*/
//So we do sth like this:
new string[50],type;
format(string,50,BizTypeList[0][biz_N]); //Now string equals Bank
type = BizTypeList[0][biz_T]; //And type equals BUSINESS_TYPE_BANK