06.05.2017, 11:52
You could just loop through the pElite array and create a parseable string out of it.
for example, as shown in your code
The string from the for loop would look like "0;1;0" (if you know how to implement that for loop).
Then just save it to a column called pElite in the player table, for retreiving and parse, just grab the string from the colum pElite and use split function with delemeter ";", you would get an array like
str[0] = 0;
str[1] = 1;
str[2] = 2;
You could then assign it to your main pElite array. It's not much complicated, as the way I've described it.
for example, as shown in your code
Quote:
|
pElite[0] = 0; //civilian, can't be elite pElite[1] = 1; //is elite of faction ID 1 pElite[2] = 0; //isn't elite of faction ID 2 |
Then just save it to a column called pElite in the player table, for retreiving and parse, just grab the string from the colum pElite and use split function with delemeter ";", you would get an array like
str[0] = 0;
str[1] = 1;
str[2] = 2;
You could then assign it to your main pElite array. It's not much complicated, as the way I've described it.
