Raised This Month: $51 Target: $400
 12% 

[ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-27-2018 , 17:13   [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #1

Hello, is there any way to create a explosion through env_explosion entity but pass the TE_EXPLFLAG_NOSOUND? I tried to set SF_ENVEXPLOSION_NOFIREBALL but this won't will work because env_explosion will still call TE_EXPLOSION message with TE_EXPLFLAG_NONE.

Code:
void CEnvExplosion::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value)
{
	TraceResult tr;

	pev->model = iStringNull;// invisible
	pev->solid = SOLID_NOT;// intangible

	Vector vecSpot;// trace starts here!

	vecSpot = pev->origin + Vector(0, 0, 8);

	UTIL_TraceLine(vecSpot, vecSpot + Vector(0, 0, -40), ignore_monsters, ENT(pev), &tr);

	// Pull out of the wall a bit
	if (tr.flFraction != 1.0f)
	{
		pev->origin = tr.vecEndPos + (tr.vecPlaneNormal * (m_iMagnitude - 24) * 0.6f);
	}

	// draw decal
	if (!(pev->spawnflags & SF_ENVEXPLOSION_NODECAL))
	{
		if (RANDOM_FLOAT(0, 1) < 0.5f)
		{
			UTIL_DecalTrace(&tr, DECAL_SCORCH1);
		}
		else
		{
			UTIL_DecalTrace(&tr, DECAL_SCORCH2);
		}
	}

	// draw fireball
	if (!(pev->spawnflags & SF_ENVEXPLOSION_NOFIREBALL))
	{
		MESSAGE_BEGIN(MSG_PAS, SVC_TEMPENTITY, pev->origin);
			WRITE_BYTE(TE_EXPLOSION);
			WRITE_COORD(pev->origin.x);
			WRITE_COORD(pev->origin.y);
			WRITE_COORD(pev->origin.z);
			WRITE_SHORT(g_sModelIndexFireball);
			WRITE_BYTE(byte(m_spriteScale)); // scale * 10
			WRITE_BYTE(15); // framerate
			WRITE_BYTE(TE_EXPLFLAG_NONE);
		MESSAGE_END();
	}
	else
	{
		MESSAGE_BEGIN(MSG_PAS, SVC_TEMPENTITY, pev->origin);
			WRITE_BYTE(TE_EXPLOSION);
			WRITE_COORD(pev->origin.x);
			WRITE_COORD(pev->origin.y);
			WRITE_COORD(pev->origin.z);
			WRITE_SHORT(g_sModelIndexFireball);
			WRITE_BYTE(0); // no sprite
			WRITE_BYTE(15); // framerate
			WRITE_BYTE(TE_EXPLFLAG_NONE);
		MESSAGE_END();
	}

	// do damage
	if (!(pev->spawnflags & SF_ENVEXPLOSION_NODAMAGE))
	{
		RadiusDamage(pev, pev, m_iMagnitude, CLASS_NONE, DMG_BLAST);
	}

	SetThink(&CEnvExplosion::Smoke);
	pev->nextthink = gpGlobals->time + 0.3f;

	// draw sparks
	if (!(pev->spawnflags & SF_ENVEXPLOSION_NOSPARKS))
	{
		int sparkCount = RANDOM_LONG(0, 3);
		for (int i = 0; i < sparkCount; i++)
		{
			Create("spark_shower", pev->origin, tr.vecPlaneNormal, nullptr);
		}
	}
}
__________________








CrazY. is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-31-2018 , 12:14   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #2

We all work for money
And youre just an mere idiot
REMEMBER ?
thEsp is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-31-2018 , 12:37   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #3

Hook the message and alter that param.
__________________
HamletEagle is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-31-2018 , 12:43   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #4

Quote:
Originally Posted by thEsp View Post
We all work for money
And youre just an mere idiot
REMEMBER ?
wtf
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 07-31-2018 , 12:51   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #5

Sounds like XY problem.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
thEsp
BANNED
Join Date: Aug 2017
Old 07-31-2018 , 13:47   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #6

Quote:
Originally Posted by Ghosted View Post
wtf
This boi seems to work for money, he sells plugins and doesn't publish them, while he gets help/information in this forum...
Should someone like him be banned ?
thEsp is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-31-2018 , 14:25   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #7

Quote:
Originally Posted by thEsp View Post
This boi seems to work for money, he sells plugins and doesn't publish them, while he gets help/information in this forum...
Should someone like him be banned ?
no, helpers must get 40% of the payment
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-31-2018 at 14:25.
Ghosted is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-31-2018 , 14:59   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #8

Quote:
Originally Posted by Ghosted View Post
no, helpers must get 40% of the payment
That would be awesome ,but he's just an economic
thEsp is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-31-2018 , 16:50   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #9

Quote:
Originally Posted by thEsp View Post
That would be awesome ,but he's just an economic
Nothing wrong with being economic!
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 08-02-2018 , 09:40   Re: [ H3LP ] env_explosion TE_EXPLFLAG_NOSOUND
Reply With Quote #10

The better way I've found was remake entire code of explode.cpp.

@thEsp, I don't see any problem in sell plugins, you're mad because you want all for free, but is not that way the life works. Instead of lose time posting bullshits, learn how to code with amxx and make plugins with yourself. The forum was made to ask, learn and help other developers, but each one can do what he want with what he've learned. The same way is with me, if I sell or not my plugins, the problem is not yours nor of any one that helped me.
__________________









Last edited by CrazY.; 08-02-2018 at 11:50.
CrazY. 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 04:18.


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