HU/getBlipVisibleDistance: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Server client function}} __NOTOC__ This function will tell you what visible distance a blip has. ==Szintaxis== <syntaxhighlight lang="lua">float getBlipVisibleDistance (...") |
No edit summary |
||
Line 35: | Line 35: | ||
{{Blip_functions}} | {{Blip_functions}} | ||
[[ | [[en:getBlipVisibleDistance]] |
Revision as of 20:59, 23 July 2018
This function will tell you what visible distance a blip has.
Szintaxis
float getBlipVisibleDistance ( blip theBlip )
OOP Syntax Help! I don't understand this!
- Method: blip:getVisibleDistance(...)
- Variable: .visibleDistance
- Counterpart: setBlipVisibleDistance
Kötelező argumentumok
- theBlip: The blip whose visible distance you wish to get.
Visszaadott érték
Returns one float with the blips visible distance, false if the blip is invalid.
Példa
This example will demonstrate basic functionality of getBlipVisibleDistance
local blip = createBlip(0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1000) outputDebugString("Blip visible distance: "..getBlipVisibleDistance(blip))
This example will combine the total visible distances of all blips
-- Retrieve a table containing all the blips that exist local 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 ;) end outputDebugString("Combined total of all blips visible distances: "..distance)