Gameplay::getRandomIntInRange

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax

Gets a random number from the range passed in.

Required Values

  • min: number
  • max: number

Return value

  • number

Syntax

mp.game.gameplay.getRandomIntInRange(min, max);

Example

const randomNumber = mp.game.gameplay.getRandomIntInRange(0, 9999);
mp.console.logInfo(`Random number is ${randomNumber}`);


See also