English Solved Saving Vehicle Position on Restart

  • Auteur de la discussion Auteur de la discussion IceEagle132
  • Date de début Date de début
29/12/19
29
15
450
Nevada
I would like to use:
C++:
save_civilian_position = true; //Save civilian location?

But the issue with this is your car goes back to storage on restart. So when you join back you spawn where you left off but without your car.
So I would like to have it so the car position is also stored.
 
Solution
Hi!
Theoretically it's possible, in practice it's more complicated because the setPos function to replace the vehicle is not precise, and it often happens (I've already tested) that the vehicle is in the ground. On top of that, there will be a lot of vehicles out on the map that could cause the server and the players to bug.

This add-on is still feasible, in the main lines it is necessary to :
  • create a new column in the database for the position of the vehicles
  • make a loop in the life_server (in init.sqf for example) that saves the position in the database of all the vehicles that have been released
  • when the vehicle is parked in the garage (fn_storeVehicle), delete the position stored in the database
  • in the init.sqf of...
Hi!
Theoretically it's possible, in practice it's more complicated because the setPos function to replace the vehicle is not precise, and it often happens (I've already tested) that the vehicle is in the ground. On top of that, there will be a lot of vehicles out on the map that could cause the server and the players to bug.

This add-on is still feasible, in the main lines it is necessary to :
  • create a new column in the database for the position of the vehicles
  • make a loop in the life_server (in init.sqf for example) that saves the position in the database of all the vehicles that have been released
  • when the vehicle is parked in the garage (fn_storeVehicle), delete the position stored in the database
  • in the init.sqf of the life_server, at server launch, spawn all vehicles that have a saved position
  • in the core/init.sqf, you have to check all the vehicles that have been taken out to give the keys to the player if he is the owner of them

I hope I've been able to help you, there are still a lot of changes to do 😅
 
Solution
Hi!
Theoretically it's possible, in practice it's more complicated because the setPos function to replace the vehicle is not precise, and it often happens (I've already tested) that the vehicle is in the ground. On top of that, there will be a lot of vehicles out on the map that could cause the server and the players to bug.

This add-on is still feasible, in the main lines it is necessary to :
  • create a new column in the database for the position of the vehicles
  • make a loop in the life_server (in init.sqf for example) that saves the position in the database of all the vehicles that have been released
  • when the vehicle is parked in the garage (fn_storeVehicle), delete the position stored in the database
  • in the init.sqf of the life_server, at server launch, spawn all vehicles that have a saved position
  • in the core/init.sqf, you have to check all the vehicles that have been taken out to give the keys to the player if he is the owner of them

I hope I've been able to help you, there are still a lot of changes to do 😅
Yup thank you for the info. :)