GetEffectDensity

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.

This function gets the density of certain effect.

Syntax

float getEffectDensity ( effect theEffect )

OOP Syntax Help! I don't understand this!

Method: effect:getDensity(...)
Variable: .density
Counterpart: setEffectDensity


Required Arguments

  • theEffect: The effect to get density of.

Example

addCommandHandler("ses", 
function (cmd)
   local density = 4
   local x, y, z = getElementPosition (localPlayer)
   local effect = createEffect ("cement", x, y, z)
   setEffectDensity (effect, density)
   getEffectDensity (effect)
end)

See also