Raised This Month: $ Target: $400
 0% 

Solved Remove smoke from HE Grenade (Black Smoke)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 01-13-2023 , 18:16   Re: Remove smoke from HE Grenade
Reply With Quote #1

Quote:
Originally Posted by shayan123 View Post
Removing the black smoke from the HE grenade explosion can be done by uncaching the sprite that is used for the smoke effect. This can be done by calling the "precache_model" function with the path of the sprite, and then passing the "PRECACHE_MODEL_UNLOAD" flag to the "precache_model" function.

To remove the sound from the explosion, you can use the "engfunc(EngFunc_PrecacheEvent, index, soundfile)" function to precache the sound, and then use the "engfunc(EngFunc_KillEvents, index)" function to stop the sound from playing.

To add a toggle for players to turn the plugin on and off, you can create a cvar using the "register_cvar" function and then check the value of the cvar in your plugin code to determine whether or not to run the code for removing the smoke and sound.

To integrate this feature with the plugin you provided, you can add the code to remove the smoke and sound in the "pfn_Explode" function, where it checks the entity classname. If the classname is "hegrenade", it would run the code to remove the smoke and sound.

It's important to note that, changing the behavior of the game in this way may affect the gameplay and it's important to test the plugin before deploying it to a production environment, also it's important to note that some servers may not allow the use of plugins that alter the standard game behavior.


Bro just asked chatgpt and copy pasted the answer 💀💀💀
__________________
deprale is offline
ChillerX
Member
Join Date: Dec 2022
Old 01-13-2023 , 21:56   Re: Remove smoke from HE Grenade
Reply With Quote #2

Gotta see the positive side—free bump LD
ChillerX is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode