Here is a current script I usually modify from the Epoch mod.

It's pretty self explanatory, with the way the script is set now it allows to be done at service stations on the map. This variable can be changed to whatever object you want to have it done at.

To be added to init.sqf :

if (!isDedicated) then {
// ... some other stuff ...
// add the next line somewhere in this block
execVM "service_point\service_point.sqf";
};

https://github.com/vos/dayz/tree/master/service_point - Main folders