031C
Jump to navigation
Jump to search
- Description
- Checks if the vehicle's secondary color is equal to the color
- Syntax
- 031C: car [car handle] secondary_color [int]
- Parameter
- [car handle]
- The handle of the vehicle
- [int]
- Car color
This conditional opcode returns true if the vehicle's secondary color is equal to the color. This opcode was never called in the original script of GTA III.
For Vice City
This opcode does not exist in Vice City but it possible to get the vehicle's secondary color. The following example, using Sanny Builder with CLEO for Vice City in an external script (not the main one) and tested on US v1.0, should work similarly to this opcode. Place this at the end of the file:
:opcode_031C // 0@ - input param (car handle) // 1@ - input param (color) 05E7: 0@ = car 0@ struct 0@ += 0x1A1 // secondary color offset 05E0: 0@ = read_memory 0@ size 1 virtual_protect 0 003B: 0@ == 1@ 05F6: ret 0
Use this line as a substitute for opcode 031C. This can be placed anywhere within the external script as a conditional statement.
// ... if 05F5: call_scm_func @opcode_031C inputs 2 car_handle [car handle] color [int] then // [RETURNED TRUE] else // [RETURNED FALSE] end // ...
Keywords
check, second, secondary, car, vehicle, color, colour
See also
- 031B, checks if the vehicle's primary color is equal to the color