_tube = _tubeModel createVehicle _worldPosition;
_tube setPos [(_worldPosition select 0) + ((cos _unitDirection) / 3), (_worldPosition select 1) - ((sin _unitDirection) / 3), _worldPosition select 2];
_tube setDir ((_unitDirection) - 90);
_tube setVelocity [(_unitVelocity select 0) + (cos _unitDirection), (_unitVelocity select 1) - (sin _unitDirection), _unitVelocity select 2];
That is your original code. Should roughly become similar to this (with optimisations obviously).
_unit setvehicleinit format["[this,%1] call INKO_Tube_drop", _tubeModel]; processinitcommands
Function needed to be defined on all ends (cept the server of course
)
INKO_Tube_drop = {
_unit = _this select 0;
_tubeModel = _this select 1;
_selectionPosition = _unit selectionPosition "RightShoulder";
_worldPosition = _unit modelToWorld _selectionPosition;
_unitDirection = getDir _unit;
_tube = _tubeModel createVehicleLocal _worldPosition;
_tube setPos [(_worldPosition select 0) + ((cos _unitDirection) / 3), (_worldPosition select 1) - ((sin _unitDirection) / 3), _worldPosition select 2];
_tube setDir ((_unitDirection) - 90);
_tube setVelocity [(_unitVelocity select 0) + (cos _unitDirection), (_unitVelocity select 1) - (sin _unitDirection), _unitVelocity select 2];
};
As for JIP, this should work on JIP, however testing will be needed to prove it.
As for the time stamp, throw in [this, %1, time] and if the time is more than (if (_time > time + (60*60*60)) exitwith {}) an hour old, exit.
The other option is a PVEH, but that will just be a pain to handle, and won't be able to easily solve all the tubes that were created.
Something else that may help you (even for advanced people, the BIKI is awesome) :
http://community.bistudio.com/wiki/setVehicleInitHope I helped, just woke up so excuse any problems in the code, was checking through the news and opened OPFEC and saw this
. Damn waking up early...