opcPostStep
{
int x = 0;
if (x > 60){ //the x count thing is primarily so that this doesnt have to run every frame, purely for opimization, since I really dont think you will notice the difference over a period of ~1sec.
x=0;
OBJHANDLE hV = oapiGetVesselByName (char *name); //name here
VESSEL *v = oapiGetVesselInterface (hV);
DWORD pCount = v->GetPropellantCount();
PROPELLANT_HANDLE ph;
double pMX;
for (int count = 0; count < pCount; count++)
{
ph = v->GetPropellantHandleByIndex(count);
pMX = v->GetPropellantMaxMass(ph);
SetPropellantMass (ph,PMX);
}
}
x++;
}