FlyingCoder Posted May 3, 2019 Report Posted May 3, 2019 Hello, is there a way for me track the number of passengers boarding the plane? I'm trying to integrate how gsx track the number of passengers boarding the planes but no idea how
Paul Henty Posted May 3, 2019 Report Posted May 3, 2019 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. Paul
FlyingCoder Posted May 3, 2019 Author Report Posted May 3, 2019 Ah okay thank you. Do you know if there is anyway for me to make the green message box appear and put my own customer text?
Paul Henty Posted May 4, 2019 Report Posted May 4, 2019 Yes you can use offsets 0x3380 and 0x32FA. See the offsets documentation for details, but in summary: Declare an offset for 3380 (string with length 128) 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: set the text in 3380. Set 32FA depending on how to want the text displayed (see the docs). Process the "SendText" group. Paul
buick552 Posted May 9, 2020 Report Posted May 9, 2020 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.
Paul Henty Posted May 9, 2020 Report Posted May 9, 2020 Hi, 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) FSUIPCConnection.Process("pmdg") 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. Paul
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now