Private vehicles
#1

Hey everyone. Me again, with another question. The thing is I want to create a vehicle dealership. Alright, everything good so far. What's the problem ... Well, the thing is I have no idea how to save / load vehicles, that way so the IDs won't mix up. What I'm trying to say is that, I load (let's say) 300 vehicles. Alright, Y_Ini read 300 files and loaded all vehicles. Perfect. Now, here's the catch, when I'm trying to delete a vehicle. Let's say, I delete vehicle ID 200.

The ingame vehicle ID 200 (on /dl) will be deleted, works. The 200.ini file in scriptfiles gets deleted aswell, perfect.

Now, when I try to create a new vehicle, after I just delete one, my GM 'getsafreevehicleslot', it reaches 200.ini and boom, file 200 found free so the code continues. I create a vehicle in game (file 200.ini in scriptfiles) but ID 301 IN GAME, since 300 vehicles were already created. When I try to buy a new car, it all fucks up. My last created vehicle dissapears and stuff like that.

ON SHORT: how can I make a private vehicle system, without mixing %i.ini's with ingame ID's ?

Thanks.
Reply
#2

(Car)
[player ID]
(Car ID)
(Color1_Color2)
{Owner_Partofname}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)