Remove smoke from HE Grenade (Black Smoke)
I am looking to remove the black smoke from HE grenade explosion.
If possible also remove the sound from explosion and a toggle so players can turn the plugin on and off. If it can be added to this plugin that would be great: https://forums.alliedmods.net/showthread.php?t=204759 If all of this is too hard then a simpler plugin for just the black smoke (uncache sprite) is ok too. Thanks in advance |
Re: Remove smoke from HE Grenade
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. |
Re: Remove smoke from HE Grenade
you can use unprecacher for a fraction of what you want
|
Re: Remove smoke from HE Grenade
Quote:
Bro just asked chatgpt and copy pasted the answer 💀💀💀 |
Re: Remove smoke from HE Grenade
Gotta see the positive side—free bump LD
|
Re: Remove smoke from HE Grenade
with reapi it's easy, hook RG_CGrenade_ExplodeHeGrenade as Post, then delete the grenade (you may need to clear the pfnThink of the grenade, it's doable with set_ent_data)
|
Re: Remove smoke from HE Grenade
Quote:
I am pretty sure this would be a helpful plugin that will slightly reduce fps drops in cs 1.6 csdm and similar DM servers. Especially for players with older pc`s which are actually the majority still playing it. Thanks in advance. |
Re: Remove smoke from HE Grenade
Quote:
PHP Code:
|
Re: Remove smoke from HE Grenade
Quote:
I would have just unprecached black_smoke1,2,3,4.spr, but idk if its also used in clientside. |
Re: Remove smoke from HE Grenade
Quote:
|
Re: Remove smoke from HE Grenade
Works perfectly, thank you!
|
| All times are GMT -4. The time now is 20:04. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.