01.08.2015, 11:55
Hey everyone! I tried to create a vehicle system in my script and I'm stuck with MySQL saving and loading.
Every player can have three vehicles at the same time and right now I've added 'Model', 'Color[2]', 'Paintjob[2]' and 'Float:Position[3]' to my VehicleData enum. I don't know what would be the best way to save all that vehicle data. I'll have to save every vehicle's mods eventually so there some even more fields.
I've come with these two options:
1) Save all vehicle data into one table without mods and create another table only for mods:
List goes on. There is also a model3 and so on.
2) One vehicle slot per row so I'll get more rows and less fields. Again there would be a mods table.
Does someone have any ideas on which method would be the best to use here?
Every player can have three vehicles at the same time and right now I've added 'Model', 'Color[2]', 'Paintjob[2]' and 'Float:Position[3]' to my VehicleData enum. I don't know what would be the best way to save all that vehicle data. I'll have to save every vehicle's mods eventually so there some even more fields.
I've come with these two options:
1) Save all vehicle data into one table without mods and create another table only for mods:
List goes on. There is also a model3 and so on.
2) One vehicle slot per row so I'll get more rows and less fields. Again there would be a mods table.
Does someone have any ideas on which method would be the best to use here?