HU/getBlipIcon

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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