M MY Multiplayer: Wiki
Side
Kind

stopEffect

Shared

Stops an effect: it stops emitting and the particles already out finish.

bool stopEffect(effect effect)

Parameters

NameTypeDescription
effecteffectThe effect.

Returns

true if it stopped. false with a wrong argument (logs a warning).

An effect a client created is destroyed once it is over. A server's effect stays as an element until it is destroyed.

Example

local smoke = createEffect("smoke_flare", 2495.1, -1687.4, 13.5)
setTimer(function()
    stopEffect(smoke)
end, 10000, 1)

See also