Chern17 Posted September 7, 2017 Share 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 Link to comment
Malone. Posted September 7, 2017 Share 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 Link to comment
quindo Posted September 8, 2017 Share 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 Link to comment
Chern17 Posted September 9, 2017 Author Share Posted September 9, 2017 quindo, I saw this page, but I was unsure so I ask you. Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now