Chern17 0 Posted September 7, 2017 Hello, guys. It is possible to create effect and attach it to player/ped? This code doesn't works, may be I doing something wrong? addCommandHandler('eff1', function() local eff local x, y, z = getElementPosition(localPlayer) eff = createEffect('fire', x, y, z, 0.0, 0.0, 0.0) setElementInterior(eff, getElementInterior(localPlayer)) attachElements(eff, localPlayer) end) Please help Share this post Link to post
Malone. 3 Posted September 7, 2017 (edited) function cmdArmedPed( command ) local x, y, z = getElementPosition(localPlayer) local thePed = createPed(217, 1568, 1832, 10) givePedWeapon(thePed, 31, 5000, true) setControlState(thePed, "fire", true) end addCommandHandler("armedped", cmdArmedPed) try it and change the position Edited September 7, 2017 by Malone. 1 Share this post Link to post
quindo 26 Posted September 8, 2017 Looking at the wiki page of AttachElements you can see that only certain types of elements can be attached, the list doesn't include effects so it's safe to say that it can't be attached. There's this: https://wiki.multitheftauto.com/wiki/AttachEffect useful function, try it 1 1 Share this post Link to post
Chern17 0 Posted September 9, 2017 quindo, I saw this page, but I was unsure so I ask you. Thank you! Share this post Link to post