Difference between revisions of "0099"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with "{{OpCode | games = {{Icon|t}} | command = GENERATE_RANDOM_INT | description = Gets a random integer between 0 and 32767 (SA) / 65535 (III & VC) and stores the result...")
 
m
 
Line 8: Line 8:
 
}}
 
}}
  
This opcode only returns a fixed range of "0" and "32767" / "65535". To return a custom range, use [[0209]] instead.
+
This opcode gets a random integer between 0 and 32767 (SA) / 65535 (III & VC) and stores the result to a variable. It only returns a fixed range of "0" and "32767" / "65535". To return a custom range, use [[0209]] instead.
  
 
== Keywords ==
 
== Keywords ==
 
random, random int, random number, random value
 
random, random int, random number, random value

Latest revision as of 12:07, 2 August 2017

GTA III Vice City San Andreas GENERATE_RANDOM_INT


Description
Gets a random integer between 0 and 32767 (SA) / 65535 (III & VC) and stores the result to a variable.
Syntax
0099: generate_random_int [var]
Parameter
[var]
Variable to store random int value

This opcode gets a random integer between 0 and 32767 (SA) / 65535 (III & VC) and stores the result to a variable. It only returns a fixed range of "0" and "32767" / "65535". To return a custom range, use 0209 instead.

Keywords

random, random int, random number, random value