HU/setBlipSize

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ó beállítja egy blip ikon méretét.

Szintaxis

bool setBlipSize ( blip theBlip, int iconSize )

OOP Syntax Help! I don't understand this!

Method: blip:setSize(...)
Variable: .size
Counterpart: getBlipSize


Kötelező argumentumok

  • theBlip: A blip, melynek a méretét meg szeretnéd kapni.
  • iconSize: A méret, amire szeretné, hogy az icon legyen. 2 az alapértelmezett érték. 25 a maximális érték.

Visszaadott érték

Visszaad egy true értéket, ha a blip méretét sikeresen beállította. false ha az elem, amit megadtunk nem blip volt, vagy ha az icon mérete nem volt érvényes.

Példa

Ez a példa visszaállítja az összes blip méretét az alapértelmezett értékre.

-- Retrieve a table containing all the blips that exist
blips = getElementsByType ( "blip" )
-- Loop through the list
for blipKey, blipValue in ipairs(blips) do
	-- Retrieve the blip's size into the variable 'blipSize'
	blipSize = getBlipSize ( blipValue )
	-- If the blip's size wasn't 2 (the default size) already
	if ( blipSize ~= 2 ) then
		-- Set the size to the default
		setBlipSize ( blipValue, 2 )
	end
end

Lásd még

Fordította