Difference between revisions of "0209"
Jump to navigation
Jump to search
Junior Djjr (talk | contribs) (Created page with "{{OpCode | games = {{Icon|t}} | command = GENERATE_RANDOM_INT_IN_RANGE | description = Gets a random int between a custom range and stores the result into a variable...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 11: | Line 11: | ||
| p3d = Variable to store random int value | | p3d = Variable to store random int value | ||
}} | }} | ||
+ | |||
+ | This opcode generates a random integer within a given range. In GTA III, the value can be generated includes both min and max value while in VC and SA it excludes the max value. | ||
== Keywords == | == Keywords == | ||
cleo, random, rand, random number, random value, random int, random integer, range | cleo, random, rand, random number, random value, random int, random integer, range |
Latest revision as of 03:57, 20 November 2024
- Description
- Gets a random int between a custom range and stores the result into a variable.
- Syntax
- 0209: generate_random_int_in_range [int] [int] store_to [var]
- Parameter
- [int]
- Min value
- [int]
- Max value
- [var]
- Variable to store random int value
This opcode generates a random integer within a given range. In GTA III, the value can be generated includes both min and max value while in VC and SA it excludes the max value.
Keywords
cleo, random, rand, random number, random value, random int, random integer, range