HU/setBlipSize

From Multi Theft Auto: Wiki
Revision as of 20:01, 24 July 2018 by Surge (talk | contribs) (Created page with "__NOTOC__ {{Server client function}} Ez a funkció beállítja egy blip ikon méretét. ==Szintaxis== <syntaxhighlight lang="lua">bool setBlipSize ( blip theBlip, int iconSi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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: The blip you wish to get the size of.
  • iconSize: The size you wish the icon to be. 2 is the default value. 25 is the maximum value.

Visszaadott érték

Returns an true if the blip's size was set successfully. Returns false if the element passed was not a blip or if the icon size passed was invalid.

Példa

This example will reset the size of all blips to the default.

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