Finds the closest player (if any) from alt.Player.streamedIn.
pos
- From which position to look for the nearest player. Defaults to local player position.
range
- In which range to search for the nearest player. Defaults to Infinity
.
Finds the closest vehicle (if any) from alt.Vehicle.streamedIn.
pos
- From which position to look for the nearest vehicle. Defaults to local player position.
range
- In which range to search for the nearest vehicle. Defaults to Infinity
.
Finds the closest virtualEntity (if any) from alt.VirtualEntity.streamedIn.
pos
- From which position to look for the nearest virtualEntity. Defaults to local player position.
range
- In which range to search for the nearest virtualEntity. Defaults to Infinity
.
Finds the closest world object (if any) from {@link Object.allWorld alt.Object.allWorld}.
pos
- From which position to look for the nearest world object. Defaults to local player position.
range
- In which range to search for the nearest world object. Defaults to Infinity
.
Returns a string representation of value
that is intended for debugging.
Loads the map area at a certain position and waits asynchronously until all parts in view area have been loaded.
Coords of the map area.
Radius of sphere to load. Defaults to 50.0.
The maximum milliseconds to wait, otherwise promise will be rejected. Defaults to 5000.
Combination of native.registerPedheadshot3
and alt.getHeadshotBase64
Combination of native.registerPedheadshot
and alt.getHeadshotBase64
Combination of native.registerPedheadshotTransparentBase64
and alt.getHeadshotBase64
Loads a model into memory asynchronously, like loadModelAsync but more safely.
Waits for the callback to return true, otherwise the promise will be rejected after timeout
If callback returns true it resolves promise.
The maximum milliseconds to wait, otherwise promise will be rejected. Defaults to 2000.
Finds the closest object (if any) from alt.Object.all.
pos
- From which position to look for the nearest object. Defaults to local player position.range
- In which range to search for the nearest object. Defaults toInfinity
.