getEffectDensity | Multi Theft Auto: Wiki Skip to content

getEffectDensity

Client-side
Server-side
Shared

Pair: setEffectDensity

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function gets the density of certain effect.

OOP Syntax Help! I don't understand this!

  • Method: effect:getDensity(...)
  • Variable: .density

Syntax

float getEffectDensity ( effect theEffect )
Required Arguments
  • theEffect: The effect to get density of.

Returns

  • float: value

Code Examples

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