Jump to content
The simFlight Network Forums

How can i track number of passengers ?

Recommended Posts

FSX and P3D do not simulate passengers.

If you have GSX and want to track GSX passengers then I think there are L:Vars you can access. I don't have GSX so you'll need to ask in their support forums. Or they may have an SDK you can download.


Link to comment
Share on other sites

Yes you can use offsets 0x3380 and 0x32FA. See the offsets documentation for details, but in summary:

  1. Declare an offset for 3380 (string with length 128)
  2. Declare an offset for 32FA (Short)

It's important they are in this order. 3380 must be declared first.

Mark them both as write only and put them in their own group (e.g. SendText).

When you want to write text:

  1. set the text in 3380.
  2. Set 32FA depending on how to want the text displayed (see the docs).
  3. Process the "SendText" group.


Link to comment
Share on other sites

  • 1 year later...

Paul, I badly need an example code for visual basic which shows reading an Lvar value and then assigning to an offset value. Can you simply give me an example code block which sends PMDG 738's seatbelt switch LVar value to an offset? I've created a great application by your marvellous dll, it works on standart offsets so far, but I'd like to start improving it by making some special dll s for some specific aircraft.

Link to comment
Share on other sites


First you need to decide which Offset you are going to write to. There is a block of unused offsets starting at 0x66C0. Also decide how many bytes you need for the value and what data type you want. Then declare this offset.

For the seat belt status we only need one byte so we'll declare it like this:

Private pmdgSeatBelt As Offset(Of Byte) = New Offset(Of Byte)("PMDG", &H66C0, True)

Then, to read the LVAR and copy the value into that offset you do this: (I don't know that the actual LVAR name is - I've just made something up here).

       ' Read the LVAR
        Dim seatBeltSwitch As Double = FSUIPCConnection.ReadLVar("L:SeatBeltSelector")

        ' Write value to user offset
        pmdgSeatBelt.Value = CByte(seatBeltSwitch)

However, do you really need to copy it into an offset? You already have the LVAR value when you execute the first line (value is in seatBeltSwitch).

Also, reading LVARs is very very slow compared to offsets. You should only use LVARs as a last resort.

The PMDG 737 (and other PMDG aircraft) have a special set of offsets. You can find these in the PDF file in the "Modules\FSUIPC Documents" folder. e.g. "Offset Mapping for PMDG 737NGX.pdf".

The offset for the 737 seatbelt selector would be declared as:

Private PMDG_737_FastenBeltsSelector As Offset(Of Byte) = New Offset(Of Byte)("PMDG_737", &H649F)

See the document for how to enable these offsets.

I recommend using these offsets instead of LVARs where available.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.