HU/getBlipIcon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
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.

Revision as of 12:39, 11 August 2018

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

  • Surge