favarotop Posted August 16, 2021 Posted August 16, 2021 Hello I'm making a server, and I need some help with creating a "Teargas" effect, I would like when typing a command the player would create a gas grenade in front of him, but without a function to take the grenade in his hand and throw it there, only if it appears activated in front of you. I tried using an idea similar to "createexplosion" but it didn't work. Can someone help me? because I need the smoke created to be amplified
DRW Posted August 16, 2021 Posted August 16, 2021 Hi, Did you try https://wiki.multitheftauto.com/wiki/CreateProjectile? Proud owner and developer of ZNEXT: Aftermath. Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience. Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. Español, Pусский, Türk, عربى, Polski, Português IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB
favarotop Posted August 19, 2021 Author Posted August 19, 2021 Hello, yes friend I used this one, but this function serves to create a weapon that supposedly shoots another projectile, it's not my case. I need that after a command the tear gas is created in front.
Moderators IIYAMA Posted August 20, 2021 Moderators Posted August 20, 2021 On 16/08/2021 at 02:34, favarotop said: I need the smoke created to be amplified You can create the teargas effect with the createEffect function. https://wiki.multitheftauto.com/wiki/CreateEffect All: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#Effects_functions It is only the visualisation of the effect. And sound can be enabled/disabled. Enjoy. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
favarotop Posted August 20, 2021 Author Posted August 20, 2021 8 minutes ago, IIYAMA said: Você pode criar o efeito de gás lacrimogêneo com a função createEffect. https://wiki.multitheftauto.com/wiki/CreateEffect Tudo: https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions#Effects_functions É apenas a visualização do efeito. E o som pode ser ativado / desativado. Aproveitar. Yes, buddy I know, but this effect doesn't actually activate the gas... it's only visible, but it doesn't asphyxia
Moderators IIYAMA Posted August 20, 2021 Moderators Posted August 20, 2021 7 hours ago, favarotop said: Yes, buddy I know, but this effect doesn't actually activate the gas... it's only visible, but it doesn't asphyxia In that case you still have to use createProjectile. If you check all parameters and put velocity and force to 0. Set the creation position. The teargas shouldn't fly away when you create it. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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