GET_RANDOM_INT_IN_RANGE
Returns a random integer from startRange up to, but not including, endRange.
Signature
int GET_RANDOM_INT_IN_RANGE(int startRange, int endRange); // 0xD53343AA4FB7DD28 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | startRange | int |
| 2 | endRange | int |
Facts
| Name | GET_RANDOM_INT_IN_RANGE |
|---|---|
| Hash | 0xD53343AA4FB7DD28 |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0xD53343AA4FB7DD28, -- GET_RANDOM_INT_IN_RANGE
0, -- int startRange
0, -- int endRange
Citizen.ResultAsInteger()
)
print(result)const result = Citizen.invokeNative("0xD53343AA4FB7DD28", // GET_RANDOM_INT_IN_RANGE
0, // int startRange
0, // int endRange
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0xD53343AA4FB7DD28, // GET_RANDOM_INT_IN_RANGE
0, // int startRange
0 // int endRange
);Related MISC natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.