HU/setBlipVisibleDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Server client function}} __NOTOC__ This function will set the visible distance of a blip. ==Syntax== <syntaxhighlight lang="lua">bool setBlipVisibleDistance ( blip theBlip...")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Server client function}}
{{Shared function hu}}
__NOTOC__
__NOTOC__
This function will set the visible distance of a blip.
Ez a funkció beállítja a blip látható távolságát.


==Syntax==  
==Szintaxis==  
<syntaxhighlight lang="lua">bool setBlipVisibleDistance ( blip theBlip, float theDistance )</syntaxhighlight>
<syntaxhighlight lang="lua">bool setBlipVisibleDistance ( blip theBlip, float theDistance )</syntaxhighlight>
{{OOP||[[blip]]:setVisibleDistance|visibleDistance|getBlipVisibleDistance|}}
{{OOP||[[blip]]:setVisibleDistance|visibleDistance|getBlipVisibleDistance|}}


===Required Arguments===  
===Kötelező argumentumok===  
*'''theBlip:''' The blip whose visible distance you wish to get.
*'''theBlip:''' A blip, amelynek látható távolsága szeretné megkapni.
*'''theDistance:''' The distance you want the blip to be visible for.
*'''theDistance:''' A távolság, amire akarod, hogy a blip látható legyen.


===Returns===
===Visszaadott érték===
Returns true if successful, false otherwise.
Visszaad egy ''true'' értéket, ha sikerült, egyébként ''false''.


==Example==  
==Példa==  
This example will demonstrate basic functionality of setBlipVisibleDistance
Ez a példa bemutatja a setBlipVisibleDistance alapfunkcióit
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local blip = createBlip(0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1000)
local blip = createBlip(0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1000)
Line 23: Line 23:
</syntaxhighlight>
</syntaxhighlight>


This example will set the visible distance of all blips to half the original value.
Ez a példa az összes blips látható távolságát az eredeti érték felére állítja.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- Retrieve a table containing all the blips that exist
-- Retrieve a table containing all the blips that exist
Line 34: Line 34:
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==Lásd még==
{{Blip_functions}}
{{Blip_functions hu}}


[[en:setBlipVisibleDistance]]
[[en:setBlipVisibleDistance]]
==Fordította==
* '''''[https://wiki.multitheftauto.com/wiki/User:Surge Surge]'''''

Latest revision as of 13:02, 21 August 2018

Ez a funkció beállítja a blip látható távolságát.

Szintaxis

bool setBlipVisibleDistance ( blip theBlip, float theDistance )

OOP Syntax Help! I don't understand this!

Method: blip:setVisibleDistance(...)
Variable: .visibleDistance
Counterpart: getBlipVisibleDistance


Kötelező argumentumok

  • theBlip: A blip, amelynek látható távolsága szeretné megkapni.
  • theDistance: A távolság, amire akarod, hogy a blip látható legyen.

Visszaadott érték

Visszaad egy true értéket, ha sikerült, egyébként false.

Példa

Ez a példa bemutatja a setBlipVisibleDistance alapfunkcióit

local blip = createBlip(0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 1000)
outputDebugString("Blip visible distance: "..getBlipVisibleDistance(blip)) --1000
setBlipVisibleDistance(blip, 2000)
outputDebugString("Blip visible distance: "..getBlipVisibleDistance(blip)) --2000

Ez a példa az összes blips látható távolságát az eredeti érték felére állítja.

-- Retrieve a table containing all the blips that exist
local 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

Lásd még

Fordította