fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Shared / getRandomInt

Function: getRandomInt()

getRandomInt(min, max): number

Generates a random integer between the specified minimum and maximum values.

Parameters

min: number

The minimum value (inclusive).

max: number

The maximum value (inclusive).

Returns

number

A random integer between min and max.

Example

getRandomInt(1, 10); // A random integer between 1 and 10

Defined in

shared/utils/FMath.ts:32