Skip to content

GenerateRandomCoords

Generate a random coords around the base coords

Argument Data Type Needed Default Description
Coords vector3 - The coords
Radius number - The limit for the generation
Heading boolean false If true return a second parameter that is a random generated heading
Returns
Data Type Description
vector3 The generated coords
heading The generated heading (only if the heading argument is true)

Dont need to be called every frame


Example
local coords = GenerateRandomCoords(GetEntityCoords(PlayerPedId()), 10.0)

Last update: April 12, 2022
Created: January 6, 2022