Hello Ronaldo,
The code below will create a smoke effect at the player's position.
It only lasts for a couple of seconds but there are plenty of other smoke effects you can choose from that will last until you destroy it.
Check out this list:
https://wiki.multitheftauto.com/wiki/El ... fects_list
https://wiki.multitheftauto.com/wiki/CreateEffect
addEventHandler("onClientResourceStart",root,
function()
local x, y, z = getElementPosition(localPlayer)
local effect = createEffect("riot_smoke",x,y,z)
end
)
This one will follow the player:
local x,y,z = getElementPosition(localPlayer)
eff = createEffect("riot_smoke",x,y,z,-90,0,0)
function render()
if not eff then return false end
local x,y,z = getElementPosition(localPlayer)
setElementPosition(eff,x,y,z)
end
addEventHandler("onClientRender",root,render)