what do i need for this?
#1

I know this isn't probably the right place to ask this, but I can't really think of anywhere else to put it.

I am NOT asking for a code... but what I am asking for, is, what do I need to learn to make a vehicle system that saves... i already know y_ini quite well, loading, saving etc, but how would i make it save a vehicle to a specific player, and of course then save the owner to an ini file for the specific vehicle... and then of course i would use if(vehicleinfo[playerid][vowner] == vOwner) or whatever to make /lock and so on...


Again, all i want to know is what i need to know to make such a system, please dont give me code, unless you add comments to it explaining what the code means

Thanks, really appreciate it.

EDIT: tried following tutorials, get errors and none are in y_ini, at least I couldn't find any but one which was giving me errors and I really had a hard time converting ones from dini and other admin systems
Reply
#2

Quote:
Originally Posted by ross8839
Посмотреть сообщение
I am NOT asking for a code... but what I am asking for, is, what do I need to learn to make a vehicle system that saves...
logic. you already have something to save data (very well documented btw..) now just think about the best way it could be done. create a flow chart if you need help or jot steps
Reply
#3

you might want to be able to determine which playerid a vehicle belongs to...
Код:
new VehicleIDOwner[2000];
...and also using a /lock command on a vehicle, retrieved by the playerid:
Код:
new PlayerOwnsVehicleID[Max-players];
by having a "2-way" array of players and vehicles, you have all possibilities to enhance the behavior.

any vehicle spawned (at server (re)start / or ingame created), will have no owner - a player logging in doesnt own a vehicle, unless the f.ex. <playername>.ini also includes the vehicleid, its' position and rotation, maybe colors aswell, and, last but not least, the playerid.

when a vehicle blows up, dont forget to either reset its ownerID, or ignore it.
when a player disconnects, save that vehicle, and destroy it, OR reset the owner so other players can use it (if the vehicle is not auto-locked).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)