HU/getBlipIcon: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Server client function}} __NOTOC__ This function returns the icon a blip currently has. ==Syntax== <syntaxhighlight lang="lua">int getBlipIcon ( blip theBlip )</syntaxhighl...") |
No edit summary |
||
Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
This function returns the icon a blip currently has. | This function returns the icon a blip currently has. | ||
== | ==Szintaxis== | ||
<syntaxhighlight lang="lua">int getBlipIcon ( blip theBlip )</syntaxhighlight> | <syntaxhighlight lang="lua">int getBlipIcon ( blip theBlip )</syntaxhighlight> | ||
{{OOP||[[blip]]:getIcon|icon|setBlipIcon}} | {{OOP||[[blip]]:getIcon|icon|setBlipIcon}} | ||
=== | ===Kötelező argumentumok=== | ||
*'''theBlip''': the blip we're getting the icon number of. | *'''theBlip''': the blip we're getting the icon number of. | ||
=== | ===Visszaadott érték=== | ||
Returns an [[int]] indicating which icon the blip has. Valid values are listed on the [[Blip Icons]] page. | Returns an [[int]] indicating which icon the blip has. Valid values are listed on the [[Blip Icons]] page. | ||
== | ==Példa== | ||
This example will find all the blips that exist and set them all to the default blip icon. | This example will find all the blips that exist and set them all to the default blip icon. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Line 28: | Line 28: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | ==Lásd még== | ||
{{Blip_functions}} | {{Blip_functions}} | ||
[[en:getBlipIcon]] | [[en:getBlipIcon]] | ||
==Fordította== | |||
* Surge |
Revision as of 20:06, 22 July 2018
This function returns the icon a blip currently has.
Szintaxis
int getBlipIcon ( blip theBlip )
OOP Syntax Help! I don't understand this!
- Method: blip:getIcon(...)
- Variable: .icon
- Counterpart: setBlipIcon
Kötelező argumentumok
- theBlip: the blip we're getting the icon number of.
Visszaadott érték
Returns an int indicating which icon the blip has. Valid values are listed on the Blip Icons page.
Példa
This example will find all the blips that exist and set them all to the default blip icon.
-- Retrieve a table containing all the blips that exist blips = getElementsByType ( "blip" ) -- Loop through the list, storing the blip from the table in the variable blipValue for blipKey, blipValue in ipairs(blips) do -- Retrieve the blip's icon into the variable 'blipIcon' blipIcon = getBlipIcon ( blipValue ) -- If the blip's icon wasn't the default already if ( blipIcon ~= 0 ) then -- Set the blip's icon to the default setBlipIcon ( blipValue, 0 ) end end
Lásd még
- createBlip
- createBlipAttachedTo
- getBlipColor
- getBlipIcon
- getBlipOrdering
- getBlipSize
- getBlipVisibleDistance
- setBlipColor
- setBlipIcon
- setBlipOrdering
- setBlipSize
- setBlipVisibleDistance
Fordította
- Surge