Posts: 1,018
Threads: 320
Joined: Jul 2010
So i wana ask how to make when a player buy a car to get a free slot in the file "cars" if you understand what I saying.
Example:
this is id 0
Car_0 and know a second player buy a car and that make a
Car_1
Posts: 150
Threads: 24
Joined: Nov 2011
Reputation:
0
Associate the vehicle with the players and not the players with the vehicle?
So instead of a playervariable = vehicleid do vehiclevariable = playerid.
Posts: 1,018
Threads: 320
Joined: Jul 2010
more details please
Posts: 150
Threads: 24
Joined: Nov 2011
Reputation:
0
Do you have existing code?
If so, instead of setting players to own vehicles set vehicles to be owned by players, that way each vehicle only needs one variable for the owner.
Posts: 1,018
Threads: 320
Joined: Jul 2010
Posts: 150
Threads: 24
Joined: Nov 2011
Reputation:
0
If you already have that then there shouldn't be a problem.
Posts: 1,018
Threads: 320
Joined: Jul 2010
but there is the problem wheN i and you buy car first it's create a file car_0 and inside is everything the owner and colors. Then is oke when you buy a car the file car_1 doesn't create when you buy a car my is just replaced with yours if you know what I mean.
Posts: 150
Threads: 24
Joined: Nov 2011
Reputation:
0
Why not create a file for every vehicle and associate the vehicles with their owners by storing the owner details inside the vehicle files?
Posts: 1,018
Threads: 320
Joined: Jul 2010
well this is what I locking