@Cpt. Kevin
Basically it is just one Lua-Line:
ipc.writeLvar("FSDT_GSX_NUMPASSENGERS", PAXNUM)
which you would need to set before (De)Boarding is called (but to be safe after the current / selected Gate has activated).
Everything else depends on how you would prefer it to be executed. The easiest manual Way would be to bind such a one-liner Lua-Script via FSUIPC to Button or Key which you would need to press accordingly. (Registered Version of FSUIPC required)
Having it set automatically requires some continuous state tracking and evaluation. That's doable but complex if you aren't used to scripting/coding - but you can have a look at the
gsx_auto Script I provided with the QualityWings Integration.
@AlphaTech
To not board the Crew, here what I use in my Tool to disable it:
FSUIPCConnection.WriteLVar("FSDT_GSX_PILOTS_NOT_BOARDING", 1);
FSUIPCConnection.WriteLVar("FSDT_GSX_CREW_NOT_BOARDING", 1);
FSUIPCConnection.WriteLVar("FSDT_GSX_PILOTS_NOT_DEBOARDING", 1);
FSUIPCConnection.WriteLVar("FSDT_GSX_CREW_NOT_DEBOARDING", 1);
FSUIPCConnection.WriteLVar("FSDT_GSX_NUMCREW", 0);
FSUIPCConnection.WriteLVar("FSDT_GSX_NUMPILOTS", 0);
That's directly from C# ... in FSUIPC Lua it would be
ipc.writeLvar("NAME", value)
Works great for me, but I hope I use it as intended