_GET_TRAIN_MODEL_FROM_TRAIN_CONFIG_BY_CAR_INDEX
Returns the model of car trainCarIndex in the train configuration trainConfig.
Signature
Hash _GET_TRAIN_MODEL_FROM_TRAIN_CONFIG_BY_CAR_INDEX(Hash trainConfig, int trainCarIndex); // 0x8DF5F6A19F99F0D5 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | trainConfig | Hash |
| 2 | trainCarIndex | int |
Facts
| Name | _GET_TRAIN_MODEL_FROM_TRAIN_CONFIG_BY_CAR_INDEX |
|---|---|
| Hash | 0x8DF5F6A19F99F0D5 |
| Namespace | |
| Returns | Hash |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local hash = Citizen.InvokeNative(0x8DF5F6A19F99F0D5, -- _GET_TRAIN_MODEL_FROM_TRAIN_CONFIG_BY_CAR_INDEX
GetHashKey("name"), -- Hash trainConfig
0, -- int trainCarIndex
Citizen.ResultAsInteger()
)
print(hash)const hash = Citizen.invokeNative("0x8DF5F6A19F99F0D5", // _GET_TRAIN_MODEL_FROM_TRAIN_CONFIG_BY_CAR_INDEX
GetHashKey("name"), // Hash trainConfig
0, // int trainCarIndex
Citizen.resultAsInteger()
);
console.log(hash)int hash = Function.Call<int>((Hash)0x8DF5F6A19F99F0D5, // _GET_TRAIN_MODEL_FROM_TRAIN_CONFIG_BY_CAR_INDEX
(uint)API.GetHashKey("name"), // Hash trainConfig
0 // int trainCarIndex
);Related VEHICLE natives
- _GET_TRAIN_DIRECTION_FROM_INDEX
- _GET_TRAIN_TRACK_FROM_TRAIN_VEHICLE
- _GET_TRAIN_VEHICLE_FROM_TRACK_INDEX
- _GET_NUM_CARS_FROM_TRAIN_CONFIG
- _GET_TRAIN_CAR
- _GET_TRACK_INDEX_FROM_COORDS
- _GET_STATION_COORDS_FROM_TRAIN_STATION_DATA
- _GET_TRAIN_CARRIAGE_TRAILER_NUMBER
- _GET_TRAIN_DIRECTION
- _GET_TRAIN_POSITION_ON_TRACK
- _GET_TRAIN_TRACK_JUNCTION_AT_COORDS
- GET_TRACK_INDEX_OF_TRAIN
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.