setBlipVisibleDistance
Client-side
Server-side
Shared
Pair: getBlipVisibleDistance
This function will set the visible distance of a blip.
OOP Syntax Help! I don't understand this!
- Method: blip:setVisibleDistance(...)
- Variable: .visibleDistance
Syntax
bool setBlipVisibleDistance ( blip theBlip, float theDistance )
Required Arguments
- theBlip: The blip whose visible distance you wish to set.
- theDistance: The distance you want the blip to be visible for. Value gets clamped between 0 and 65535.
Returns
- bool: result
Returns true if successful, false otherwise.
Code Examples
shared
This example will set the visible distance of all blips to half the original value.
-- Retrieve a table containing all the blips that existlocal blips = getElementsByType("blip")-- Loop through the list, storing the blips visible distance with the rest.for index, blip in ipairs(blips) do -- Retrieve the blip's visible distance and divide by 2 setBlipVisibleDistance(blip, getBlipVisibleDistance(blip) / 2)end