|
Author
|
Message
|
|
Senior Member
Join Date: Oct 2018
Location: Leeds
|

01-13-2023
, 18:16
Re: Remove smoke from HE Grenade
|
#1
|
Quote:
Originally Posted by shayan123
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 💀💀💀
__________________
|
|
|
|