How is pVeh[4] stored in mysql?
#8

You could just loop through the pElite array and create a parseable string out of 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

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.
Reply


Messages In This Thread
How is pVeh[4] stored in mysql? - by Saddin - 06.05.2017, 10:56
Re: How is pVeh[4] stored in mysql? - by Vince - 06.05.2017, 11:17
Re: How is pVeh[4] stored in mysql? - by coool - 06.05.2017, 11:20
Re: How is pVeh[4] stored in mysql? - by ShihabSoft - 06.05.2017, 11:28
Re: How is pVeh[4] stored in mysql? - by Saddin - 06.05.2017, 11:34
Re: How is pVeh[4] stored in mysql? - by ShihabSoft - 06.05.2017, 11:36
Re: How is pVeh[4] stored in mysql? - by Saddin - 06.05.2017, 11:39
Re: How is pVeh[4] stored in mysql? - by ShihabSoft - 06.05.2017, 11:52
Re: How is pVeh[4] stored in mysql? - by Vince - 06.05.2017, 11:54
Re: How is pVeh[4] stored in mysql? - by Saddin - 06.05.2017, 12:00
Re: How is pVeh[4] stored in mysql? - by coool - 06.05.2017, 12:03
Re: How is pVeh[4] stored in mysql? - by Saddin - 06.05.2017, 12:08
Re: How is pVeh[4] stored in mysql? - by Saddin - 06.05.2017, 22:49
Re: How is pVeh[4] stored in mysql? - by ShihabSoft - 07.05.2017, 04:41
Re: How is pVeh[4] stored in mysql? - by Saddin - 07.05.2017, 11:03
Re: How is pVeh[4] stored in mysql? - by ShihabSoft - 07.05.2017, 11:05
Re: How is pVeh[4] stored in mysql? - by Saddin - 07.05.2017, 11:09
Re: How is pVeh[4] stored in mysql? - by Vince - 07.05.2017, 11:44
Re: How is pVeh[4] stored in mysql? - by Saddin - 07.05.2017, 12:23

Forum Jump:


Users browsing this thread: 1 Guest(s)