047D
Jump to navigation
Jump to search
Description
- Gets number of seats in vehicle with specified model
Syntax
- 047D: get_number_of_seats_in_model [int] store_to [var]
Parameter
- [int]
- [var]
- Variable to store number of seats
This opcode stores the number of seats in a model. The model must be a valid vehicle model, otherwise the opcode returns an unexpectable result. Some returned values are hardcoded as described below:
Model Id | Model Name | Number of seats |
---|---|---|
97 | FIRETRUK | 2 |
124 | TRAIN | 3 |
127 | COACH | 2 or 9[1] |
131 | RCBANDIT | 1 |
Note
^ Basically this opcode returns the number of doors for the model plus one. Thus it never returns a value less than 1. To optimize the game performance, the number of doors is only counted at the first loading of the model. If the model was not loaded before calling this opcode, the result is always 2. The Coach model is the only one influenced by the inaccurate coding: once it's loaded the opcode returns 9 as the result.
Keywords
model, seats, store, get