getBlipVisibleDistance
Client-side
Server-side
Shared
Pair: setBlipVisibleDistance
This function will tell you what visible distance a blip has.
OOP Syntax Help! I don't understand this!
- Method: blip:getVisibleDistance(...)
- Variable: .visibleDistance
Syntax
float|false getBlipVisibleDistance ( blip theBlip )
Required Arguments
- theBlip: The blip whose visible distance you wish to get.
Returns
- float|false: visibleDistance
Returns one float with the blips visible distance, false if the blip is invalid.
Code Examples
shared
This example will combine the total visible distances of all blips.
-- Retrieve a table containing all the blips that existlocal blips = getElementsByType("blip")local distance = 0-- 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 distance = distance + getBlipVisibleDistance(blip) or 0 -- "or 0" just incase its false ;)endoutputDebugString("Combined total of all blips visible distances: "..distance)