HU/getBlipIcon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Server client function}}
{{Shared function hu}}
__NOTOC__
__NOTOC__
Ez a funkció visszaadja a blip jelenlegi iconját.
Ez a funkció visszaadja a blip jelenlegi iconját.
Line 9: Line 9:


===Visszaadott érték===
===Visszaadott érték===
Visszaad egy [[int]] értéket, jelezve, hogy a blipnek melyik az iconja. Az érvényes értékeket megtalálja a [[Blip Icons]] oldalon.
Visszaad egy [[int]] értéket, jelezve, hogy a blipnek melyik az iconja. Az érvényes értékeket megtalálja a [[Radar Blips]] oldalon.


==Példa==  
==Példa==  
Line 34: Line 34:


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

Latest revision as of 15:58, 24 February 2019

Ez a funkció visszaadja a blip jelenlegi iconját.

Szintaxis

int getBlipIcon ( blip theBlip )

OOP Syntax Help! I don't understand this!

Method: blip:getIcon(...)
Variable: .icon
Counterpart: setBlipIcon


Kötelező argumentumok

  • theBlip: a blip, amelynek megkapjuk az icon számát.

Visszaadott érték

Visszaad egy int értéket, jelezve, hogy a blipnek melyik az iconja. Az érvényes értékeket megtalálja a Radar Blips oldalon.

Példa

Ez a példa megtalálja az összes létező blipet, és az összeset az alapértelmezett blip iconra állítja be.

-- 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

Fordította